So, my strategy is running on a 3 min chart. It uses AddDataSeries() to load a 1 tick series, as well as a 1 day series (as well as a few others, but not important here). In the strategy analyzer I'm running it with Tick Reply enabled.
When it runs, it prints out the number of bars loaded for each data series it loads. For the 1 day series it prints out a number equal to the number of days I've selected to run the strategy. So if I select to start on some Monday and end the following Friday, it prints "5". (By printing BarsArray[dailyIndex].Count inside State.DataLoaded).
But, my strategy needs "the previous day" in order to work correctly. So on that Monday, I get the "You are accessing an index with a value that is invalid since it is out-of-range" error because I'm trying to access Highs[dailyIndex][1] and Lows[dailyIndex][1], but there's only 1 daily bar available on Monday, Monday's. (I can verify that by printing BarsArray[dailyIndex].Count in the OnBarUpdate() method.)
So... my question is, how can I get the strategy analyzer (or my strategy in general) to load more bars when adding the daily series?
I don't run into this issue when running in Playback mode as I've manually downloaded enough data for my testing.
Thanks!

Comment