Add secondary data series required by opening range indicator according to the current bars on the chart

This commit is contained in:
moshferatu 2024-05-13 07:36:58 -07:00
parent 1a17b9bd95
commit 55b6abf526

View File

@ -38,9 +38,9 @@ namespace NinjaTrader.NinjaScript.Strategies
}
else if (State == State.Configure)
{
// Data series required by the opening range indicator, must be loaded here.
AddDataSeries(BarsPeriodType.Minute, 1);
AddDataSeries(Instrument.FullName, new BarsPeriod
{ BarsPeriodType = BarsPeriodType.Minute, Value = 5 }, "US Equities RTH");
AddDataSeries(Instrument.FullName, BarsPeriod, "US Equities RTH");
}
else if (State == State.DataLoaded)
{