# Technical Studies Reference

### Bollinger Bands

This study calculates and displays Bollinger Bands for the data specified by the Input Data Input, as well as a Moving Average of the Input Data.

Let $$X$$ be a random variable denoting the Input Data, and let $$X_i$$ be the value of the Input Data at Index $$i$$. Let the Inputs Length and Standard Deviations be denoted as $$n$$ and $$v$$, respectively. Then we denote the Bollinger Bands at Index $$t$$ for the given Inputs as $$TB^{(B)}_t(X,n,v)$$ (Top Band) and $$BB^{(B)}_t(X,n,v)$$ (Bottom Band), and we compute them for $$t \geq n - 1$$ in terms of a Simple Moving Average and a Standard Deviation as follows.

Top Band: $$TB^{(B)}_t(X,n,v) = MA_t(X,n) + v \cdot \sigma_t(X,n)$$

Bottom Band: $$BB^{(B)}_t(X,n,v) = MA_t(X,n) - v \cdot \sigma_t(X,n)$$

The band in the middle is the graph of $$MA_t(X,n)$$.

Note: Depending on the setting of the Input Moving Average Type, the Simple Moving Average in 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.