I want my secondary bar series to always choose the same Trading Hour Template as chosen in the Strategy Analyzer via code.
I have the following code:
AddDataSeries(Instrument.MasterInstrument.Name, new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 1440 }, Instrument.MasterInstrument.TradingHours.Name);
The problem is, "Instrument.MasterInstrument.TradingHours.Name " only adds the Trading Hours Template of the default instrument trading hour template. If I choose another Trading Hour Template in the Strategy Analyzer, the secondary bar series still uses the default instrument trading hour template. How can I solve this?
Thanks!
Kirk
Comment