I have this in Initialize:
Add(PeriodType.Tick, 4080);
I have this in OnBarUpdate:
if (CurrentBar < 120) return;
This seems to be causing my error as it is the only place I refer to the additional series:
Plot5.Set(0); if (Math.Sign(EMA(Closes[1],10)[0] - EMA(Closes[1],80)[0]) > 0) PlotColors[5][0] = Color.Green; else PlotColors[5][0] = Color.Red;
Comment