I want to add a 1440 minute data series with trading hours template x and another 1440 minute data series with trading hours template y on the same instrument:
AddDataSeries("ES 06-23", new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 1440 }, "Custom Trading Hours X");
AddDataSeries("ES 06-23", new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 1440 }, "Custom Trading Hours Y");
However the script only processes the data from the first added data series (Trading Hours X) and not from the second added data series (Trading Hours Y).
The Help Guide says:
"When adding multiple Data Series of the same instrument and the same Bar Type, the 'barsToLoad' property will only be effective on the first added series. Subsequent series with a different barsToLoad setting will not load a different number of bars than the first series."
- Is there a way I can add the same instrument with the 1440 minute data with different trading hours? I tried to create a custom BarsPeriodType with 1440 minutes but couldn't make it work as expected.
The Help Guide says further: "If your NinjaScript object is using AddDataSeries() allowing to specify a tradingHoursName, please keep in mind that: An indicator / strategy with multiple DataSeries of the same instrument will only process realtime OnBarUpdate() calls when a tick occurs in session of the trading hour template of all added series. Any ticks not processed will be queued and processed as a tick comes in for all subsequent DataSeries."
- Does this mean that eg. if Trading Hours Template X goes until 3pm and trading Hours Template Y goes until 5pm OnBarUpdate will not be processed between 3 and 5 pm until the next day open of trading hours template X?

Comment