Formula for Bollinger Bands...

 

Hi all could someone help me with the formula for Bollinger bands? This is what I have got:


int BandsPeriod = 20;

BollingerMA = iMA(NULL,0,BandsPeriod,BandsShift,MODE_SMA,PRICE_CLOSE,1);
Deviation=MathSqrt(Close[1] - BollingerMA);
Deviation = Deviation/20;
UpperBand = BollingerMA + (Deviation * BandsDeviations);
LowerBand = BollingerMA - (Deviation * BandsDeviations);
 
int BandsPeriod = 20;

BollingerMA = iMA(NULL,0,BandsPeriod,BandsShift,MODE_SMA,PRICE_CLOSE,1);
Deviation=iStdDev(NULL, 0, BandsPeriod.....

UpperBand = BollingerMA + (Deviation * BandsDeviations);
LowerBand = BollingerMA - (Deviation * BandsDeviations);
 
blogzr3:

Thanks heaps for that - now I can set about making millions!
Reason: