I am currently messing around with NinjaScript and strategy building and ran into something I couldn't figure out. I have a strategy that uses a secondary data series inside of it. I am familiar with how to access it with BarsArray[1] et cetera. The strategy seems to pull the data from the additional data series and the logic works well. However, I want to add the indicator used with the secondary data set to the chart (presumably with AddChartIndicator()). This works fine with the primary data set. I can run the backtest and see the indicator on the backtest chart for analysis. The indicator for the additional data set does not show up. The panel is present, but the indicator values are not.
The photo below shows a chart with ths strategy activated and a data box. You can see that the one indicator show fine. However, the one attached to the 30m series is greyed out and doesn't show on the chart.
The code below is what I'm using. Called within State.DataLoaded.
AddChartIndicator(EMA(12)); AddChartIndicator(EMA(BarsArray[1], 12));
Where am I going wrong? Any help would be greatly appreciated.
- atariaf

Comment