# Technical Studies Reference

### Moving Average Envelope

The Moving Average Envelope study calculates and displays a Moving Average of Moving Average Length $$n$$ for the data specified by the Input Data Input.

The distance between the Moving Average and each of the Bands is either a specified Fixed Value $$FV$$ or a specified Percentage $$P$$ of the Moving Average, depending on the value of the Percentage or Fixed Value Input.

Let $$X$$ be a random variable denoting the Input Data. We denote the value of the Top Band and Bottom Band at chart bar $$t$$ for the given Inputs as $$TB^{(MAE)}_t(X,n)$$ and $$BB^{(MAE)}_t(X,n)$$, respectively. We calculate these values in terms of a Simple Moving Average as follows.

$$TB^{(MAE)}_t(X,n) =\left\{ \begin{matrix} SMA_t(X,n) + FV & Percentage \space or \space Fixed \space Value = Fixed \space Value \\ SMA_t(X,n)\cdot(1 + P) & Percentage \space or \space Fixed \space Value = Percentage \end{matrix}\right .$$

$$BB^{(MAE)}_t(X,n) =\left\{ \begin{matrix} SMA_t(X,n) - FV & Percentage \space or \space Fixed \space Value = Fixed \space Value \\ SMA_t(X,n)\cdot(1 - P) & Percentage \space or \space Fixed \space Value = Percentage \end{matrix}\right .$$

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

#### Inputs

• Input Data
• Percentage or Fixed Value: Select either Percentage or Fixed Value. In the case of Percentage, set the percentage with the Percentage Input. In the case of Fixed Value, set the fixed value with the Fixed Value Input.
• Percentage
• Fixed Value: If Percentage or Fixed Value is set to Fixed Value, enter the fixed value with this Input to add and subtract this fixed value to/from the moving average.
• Moving Average Type
• Moving Average Length