images/contents.gifimages/index.gifimages/prev1.gifimages/next1.gif

BB()

Definition Bollinger bands. Developed by John Bollinger, bollinger bands are lines rendered at fixed intervals around a moving average, as a function of a markets volatility. Lines are plotted above and below the chosen moving average at a distance equal to two times the root mean square of the deviations from the moving average. The length of the data used is set by the number of periods calculated in the moving average.

Syntax images/aspen00000220.gif

Formula 1. images/aspen00000221.gif

2. images/aspen00000222.gif

3. images/aspen00000223.gif

4. images/aspen00000224.gif

5. images/aspen00000225.gif

6. images/aspen00000226.gif

or
images/aspen00000227.gif

Where:

AM = arithmetic mean.

D1 = raw deviation.

D2 = squared deviation.

TSD = total squared deviation.

MSD = mean squared deviation.

SD = standard deviation.

P = number of periods.

DP = data point.

Parameters SERIES
Required if the formula name declares the SERIES parameter.

INPUT
Required if the formula name declares the INPUT parameter.

<ma_len>
Moving average length.

<std_dev>
Standard deviation.

<env_length>
Envelope length.


<shift>
A number, positive or negative, enclosed in brackets defining the number of bars (periods) to shift the formula line. Typically used only in formulas that will be rendered in chart windows.

Examples BB_EX1(SERIES,ma_len=9,std_dev=1,env_len=2)=BB(SERIES,ma_len,std_dev,env_len)

BB_EX2(INPUT,ma_len=9,std_dev=1,env_len=2)=BB(INPUT,ma_len,std_dev,env_len)[1]

See also: Bollinger Bands Study