In the code:
Plot0.Set((Bollinger(deviation,Period).Upper[0] - Bollinger(deviation,Period).Lower[0])/SMA(20)[0]);
It appears to me that 20 is a hardcoded period.
Code should probably be:
Plot0.Set((Bollinger(deviation,Period).Upper[0] - Bollinger(deviation,Period).Lower[0])/SMA(Period)[0]);
Comment