# Technical Studies Reference

### Bollinger Bands: %B

This study calculates and displays the %B of a pair of Bollinger Bands for the data specified by the Input Data Input. Refer to the documentation of that study for an explanation of the notation used here. We denote the Bollinger Bands %B at Index $$t$$ as $$\% B_t(X,n,v)$$, and we compute it for $$t \geq n - 1$$. The formula that is used to compute $$\% B_t(X,n,v)$$ depends on the setting of the Base Band Input. We describe this in detail below.

If Base Band Input is set to Lower Band (that is, the Bottom Band $$BB^{(B)}_t(X,n,v)$$, then we compute $$\% B_t(X,n,v)$$ as follows.

$$\% B_t(X,n,v) = \displaystyle{\frac{X_t - BB^{(B)}_t(X,n,v)}{TB^{(B)}_t(X,n,v) - BB^{(B)}_t(X,n,v)}}$$

If Base Band Input is set to Middle Band, then we replace the Bottom Band with a Simple Moving Average of the Input Data, as follows.

$$\% B_t(X,n,v) = \displaystyle{\frac{X_t - SMA_t(X,n)}{TB^{(B)}_t(X,n,v) - SMA_t(X,n)}}$$

Note: Depending on the setting of the Input Moving Average Type, the Simple Moving Average each of the above formulas could be replaced with an Exponential Moving Average, a Linear Regression Moving Average, a Weighted Moving Average, a Wilders Moving Average, a Simple Moving Average - Skip Zeros, or a Smoothed Moving Average.

In addition to the graph of $$\% B_t(X,n,v)$$, this study also displays horizontal lines at vertical positions determined by the Upper Line Threshold Value and Lower Line Threshold Value Inputs.

#### Inputs

• Input Data
• Moving Average Type
• Length
• Standard Deviations
• Base Band: This Input determines whether the Lower (Bollinger) Band or the Middle Band (Moving Average) is used in the computation of %B.
• Upper Line Threshold Value: Determines the vertical location of the Uppper Threshold Line.
• Lower Line Threshold Value: Determines the vertical location of the Lower Threshold Line.