I need to calculate ninja indicators i.e ema, sma etc on data of different instruments outside the main indicator class. I have populated bar series for each instrument using GetBar method. Following is the piece of code that I am using to get data bars:
Bars newBars = Data.Bars.GetBars(Cbi.Instrument.GetObject(instrument), new Period(PeriodType.Minute, period, MarketDataType.Last), startTime, endTime, Data.Bars.GetSession(Cbi.Instrument.GetObject(instrument), session), Data.Bars.SplitAdjust, Data.Bars.DividendAdjust);
Thanks,
Comment