Doubt about Bollinger Bands

Hi! I’m not sure if this is the place for this, so I’m sorry if I posted on the wrong forum.

So, I have a doubt about calculating Bollinger Bands. I’ve been trying to calculate them and all the formulas I found were like this: a simple moving average with 20 days period as the center line and the bands with two standard deviations above and below the moving average.

The result is that the difference between the upper band to the moving average and the difference between the moving average to the lower band is exactly the same, always. But when I look at the graphics (on MetaTrader 4), the numbers for the bands are slightly different from the ones I’ve calculated (the moving average is right though) and the differences I mentioned above aren’t the same.

Does anyone knows what I’m doing wrong?

I guess it would depend on how you are calculating the standard deviation. The correct process to do it is.

  1. work out he mean average of all of the prices you are looking at
  2. for each of the 20 prices you have subtract the mean from it so you end up with a bunch of + and - numbers (when added together these should all add up to 0)
  3. for each of the values from 2 you then need to square these numbers and record them (this gets rid of all the negative numbers)
  4. once you have all the square answers from 3 you then divide the total by the number of numbers used (in this case 20)
  5. Once that is done you then take the square root of the number from 4 to give you your standard deviation.
  6. You then need to multiply this by 2 to get your 2 standard deviations.

There are a 3 things that might be causing the difference. (1) Either you or MT4 are calculating it incorrectly. (2) Are you both working out the mean the same way, as far as I am aware MT4 would use the simple moving avereage, you’re not using the exponential moving average or anything like that are you? (3) there is something called Bessels Correction which is used when calculating standard deviation on a small sample size. and that would come into effect on step 4 above where instead of dividing the number by 20 you divide it but n-1 which would be 19 this is supposed to give a bit more allowance as you are only using a small sample…

Hope this helps but if not then post your calculations so I can have a look at them.

I’m not a fan of Bolly Bands really so I’ve never noticed this before…

Laters

DT.

Why do you try to waste your time calculating bollinger bands when you can add them to your charts and have them calculated for you?

Did you read his post? He’s got Bollinger Bands already charted.

I did read it yes, but he still tries to calculate them or compare what the MT4 chart shows to his own calculations which I think is not necessary. Too many times new traders focus on things that should not really matter and tend to ignore what is important.

To be honest I wish more people would take time learning and understanding stuff like this… It is only through really understanding these things that you can actually gain some value from them. It seems to me that far too many people just jump in at the deep end without questioning and learning…

Perhaps he could be developing a spreadsheet? or maybe his own indicator? who knows. At the end of the day he wants to learn something which in my book is admirable.

DT.

In the end, as long as it helps to achieve profitability its all good. Everyone has their own approach.