Bollinger Bands
Characteristic bands are calculated for a value change (price, indicator, etc.). The Bollinger bands are plotted at standard deviation levels above and below the moving average of the value (which is the main, middle band of the chart).
Parameters:
- N - number of time periods in the moving average.
- k - number of standard deviations.
Calculation:
Simple Moving Average is calculated for the close for the j-th time period on the first step. The resulting values make the Middle Band of the chart which is sometimes omitted.
Then the upper and the lower bands are calculated:
- The upper band is equal to the sum of the middle band and the product of k and standard deviation:
- The upper band is equal to the difference of the middle band and the product of k and standard deviation:

|