In strategy analyzer, one can simply start the analysis a month into the past and let it run, but this creates an obvious issue when transitioning to live trading.
So, I altered my code using the longer "AddDataSeries" syntax which allows barsToLoad to be included. However, this doesn't seem to be pulling through when using strategy analyzer.
When I debug using print I would expect there to be bars of the loaded historical data available from the start (Output1).
At a minimum I'd think that a few months into the analysis the data would start being pulled in (Output2).
Are there known issues with this method?
Thanks,
David
Note that the instrument names are placeholders.
AddDataSeries Code:
else if (State == State.Configure)
{
AddDataSeries("A", new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 1 }, 1170, "US Equities RTH", true);
AddDataSeries("A", new BarsPeriod { BarsPeriodType = BarsPeriodType.Day, Value = 1 }, 30, "US Equities RTH", true);
AddDataSeries("B - Note this is Default Instrument", new BarsPeriod { BarsPeriodType = BarsPeriodType.Day, Value = 1 }, 3, "US Equities RTH", true);
AddDataSeries("
}
Code to Debug:
Print("Instrument Bars" + CurrentBars[0]);
Print("A Minute Bars" + CurrentBars[1]);
Print("A Day Bars" + CurrentBars[2]);
Print("Instrument Day Bars" + CurrentBars[3]);
Print("Instrument Minute Bars" + CurrentBars[4]);
Print(" "); //So that there is a space and easier to follow in the output
Output at Start:
Instrument Bars6
A Minute Bars-1
A Day Bars-1
Instrument Day Bars-1
Instrument Minute Bars6
Instrument Bars7
A Minute Bars-1
A Day Bars-1
Instrument Day Bars-1
Instrument Minute Bars7
Instrument Bars8
A Minute Bars-1
A Day Bars-1
Instrument Day Bars-1
Instrument Minute Bars8
Instrument Bars9
A Minute Bars-1
A Day Bars-1
Instrument Day Bars-1
Instrument Minute Bars9
Output Several Months into the Analysis:
Instrument Bars29618
A Minute Bars-1
A Day Bars-1
Instrument Day Bars-1
Instrument Minute Bars29618
Comment