Strategy Monitor Error(3): The given key was not present in the dictionary
Author: tradergeorge
Creation Date: 12/18/2019 1:20 PM
profile picture

tradergeorge

#1
I have been using the WL 6.9.22.7 (64-bit) from Fidelity.

Since yesterday, I get this error when using the "Strategy Monitor" and when I activate any strategy on the 1 Minute time scale. The error is shown in the "Action" bar and says:

Error(3): The given key was not present in the dictionary


If I change the time scale to 5-minute, then it works fine and loads the data and returns the bars. I think the problem is only with 1 minute time scale.

Any idea why the 1-minute strategy monitor gives this error ? It was working fine until yesterday.

Thanks
George
profile picture

Eugene

#2
An unknown strategy applied to unknown symbols with unknown settings? Sure, it's easy! :) In fact I have some ideas but would prefer to avoid guesswork. Please provide more context:

1. Symbol(s) - apparently this is the key
2. Single symbol or Multi-symbol mode, Position Sizing, and Data Loading settings
3. Right click on the deactivated (or just added) strategy, choose "Enable logging for selected items", then Activate, let it run to the error, highlight the item, click "View the item log", copy/paste here or attach as TXT file
profile picture

tradergeorge

#3
1. I use the "Strategy Activation Settings" to select one of the predefined DataSet - e.g. Dow 30 or Nasdaq 100
2. Using the same Strategy Activation Settings, the Data Range I tried using 20 and 100 bars. Position size set to $5000 on PaperAccount1.
3. The problem seems to be only with 1 minute interval. Here the log :

12/18/2019 8:49:45 AM: Calculating NextRun...
12/18/2019 8:49:45 AM: NextRun set to 12/18/2019 9:31:00 AM
12/18/2019 8:49:45 AM: Preparing for initial Data Population
12/18/2019 8:49:45 AM: Starting Populate Thread
12/18/2019 8:49:45 AM: In Populate Thread
12/18/2019 8:49:45 AM: Populating: Dow 30
12/18/2019 8:49:45 AM: Updating: Dow 30
12/18/2019 8:49:45 AM: Error(3): The given key was not present in the dictionary.
12/18/2019 8:49:45 AM: Leaving Update Thread from catch

I attached the log for 5 minute for same strategy settings (only difference is time scale) which seems okay. The 3 minute and daily scales also have no problem loading the data.
profile picture

Eugene

#4
Thanks. An "Error(3)" indicates a failure during the data population phase (as identified by e.g. "12/18/2019 8:53:27 AM: In Populate Thread").

This error previously appeared in the context of having symbols that failed to update e.g. illiquid, or with a reverse split (fixed). Additionally, the log indicates there are many non-Dow 30 symbols but am not sure if this is a clue.

I'd suggest to update your DataSet manually using the Data Manager and narrow it down to experiment until you find the stubborn symbol that breaks the SM population.
profile picture

tradergeorge

#5
Thanks Eugene. I manually added couple of symbols and seems to work fine now.
profile picture

Eugene

#6
Good to know. Could you tell me what symbols you added or deleted that caused the problem on 1 min scale?
profile picture

tradergeorge

#7
There may be others, but AAPL is the culprit so far.
profile picture

Eugene

#8
Thanks. Pretty odd. One of us will look into it tomorrow.
profile picture

Cone

#9
I wasn't able to duplicate this error using 1-minute data and the symbols in your SCLog.
If AAPL is a problem, try deleting its .WL data file in the ..\Data\FidelityStaticDataProvider\1 minute\A folder and download again. Alternatively, you can try reloading it from a chart by right clicking > Reload Chart History.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).