DrawRegion("tag1", CurrentBar, 0, Bollinger(0.9,12).Upper, Bollinger(0.9,12).Lower, Color.Empty, colorShading, 2);
the code will work but I will get an error when I try to export the indicator.
If however, I copy the code from the Bollinger indicator, and in the DrawRegion use the data series in my indicator the following code will both work and export.
double smaValue = SMA(Period)[0];
double stdDevValue = StdDev(Period)[0];
Upper.Set(smaValue + NumStdDev * stdDevValue);
Middle.Set(smaValue);
Lower.Set(smaValue - NumStdDev * stdDevValue);
DrawRegion("tag1", CurrentBar, 0, Upper, Lower, Color.Empty, colorShading, 2);
Why will the first example work but not export?
Comment