yccheok / jstock

JStock is a free stock market software for 28 countries.
https://jstock.org
664 stars 348 forks source link

[Bollinger Band] is mean deviation same as standard deviation? #45

Closed ghost closed 9 years ago

ghost commented 9 years ago

I am trying to make a bollinger band indicator in jstock editor. Currently I am trying to create the upper line using this formula

Upper line = SMA(20)+2*20-day-Standard deviation

the problem is i cant find a standard deviation from the editor option instead i got Mean deviation. Are both same or different? my indicator http://i.imgur.com/IR4oiNa.png

RandallSell commented 9 years ago

Hi PotHead,

No Standard Deviation is NOT the same as Mean Deviation, although with the correct numbers they would come out the same. The STD would never be a negative number, whereas the MD could be a negative value.

This might help a bit: http://www.investopedia.com/ask/answers/021215/what-difference-between-standard-deviation-and-average-deviation.asp

And yes, i can't find an STD function either - weird that it doesn't have it. So alas you are probably stuck doing it the hard way by doing the calc yourself. Having said that, I don't recall seeing a square-root function either so if that is missing you would be SOL.

-randall

ghost commented 9 years ago

Hi RandallSell , Thank you for the comment. It seems I cant calculate standard deviation in jstock. Jstock editor lacks many math function like square root, log, exponential etc. Now i have to find another way :(

Once more thanks man for the quick info :100: