Bollinger Bands

"Bollinger Bands" has three bands: "Upper Bollinger Band", "Lower Bollinger Band", which are plotted around a "Middle Band", a moving average using the value of standard deviation.

Calculation

First the Moving Average of prices ("Middle Band") is calculated. This is a Simple Moving Average.

Than the Standard Deviation is calculated by using the following formula:

After these, we can calculate the "Upper" and "Lower Bollinger Bands" by using the following formulas:

where:

"Price" can be: Close, Open, High, Low, HL MidPoint, HLC MidPoint or HLCO MidPoint and
"D" is the number of standard deviations (two deviations)

From "Indicator Properties" you can change the settings for indicator:

This dialog has three sections: "Upper Band", "Middle Band" and "Lower Band" from where you can set line visibility, thickness, color and style for them. The "Price" used in the construction of indicator can be: Close, Open, High, Low, HL MidPoint, HLC MidPoint or HLCO MidPoint. From "Length" you can change the number of points that are used in the moving average.

Bollinger Bands indicator on a chart

Go to the top of page