I am having an issue with getting indicators built from a larger data series to line up with a smaller data series on the chart.
When using the chart tools there is no issue and it works as expected.
But when I do nearly the same thing but through NinjaScript the indicators show up for only a few bars then stop. (As if they are scaled to the smaller data series instead of the larger?)
Here is a snippet of the NinjaScript I am using to add the MACD/EMA to the chart.
else if (State == State.Configure)
{
AddDataSeries(BarsPeriodType.Minute, 240);
}
else if (State == State.DataLoaded)
{
macd = MACD(BarsArray[1],12,26,9);
bigEMA = EMA(BarsArray[1], 14);
macd.IsOverlay = false;
AddChartIndicator(macd);
bigEMA.IsOverlay = false;
AddChartIndicator(bigEMA);
}
}
Thank you to whoever takes the time to help me sort this out.

Comment