I'm using StrategyPlot() to plot inside a strategy.
I built my StrategyPlot(0) and had no issues. Now I wanted to add StrategyPlot(1) which is simply the 11 period SMA of StrategyPlot(0).
StrategyPlot(1).Value.Set(SMA(StrategyPlot(0), 11)[0]);
I keep on getting overflow error. I tried to add
if(CurrentBar < 11)
return;
with no success. Since I'm not dividing anything by zero, I don't see what else it can be.
Thank you

Comment