#### Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Moving Average - Generalized Double Exponential

# Technical Studies Reference

- Technical Studies Reference
- Common Study Inputs (Opens a new page)
- Using Studies (Opens a new page)

### Moving Average - Generalized Double Exponential

This study calculates and displays a Generalized Double Exponential Moving Average (GDEMA) of the data specified by the **Input Data** Input.

This study is closely related to the Exponential Moving Average (EMA), Double Exponential Moving Average (DEMA), and the T3 Moving Average (T3). Just as with DEMA and T3, we use the shorthand notation \(EMA_t^{(j)}(X,n)\) to denote the \(j-\)fold composition of the EMA function with itself.

Let \(X\) be a random variable denoting the **Input Data**, and let the Inputs **Length**, **Multiplier**, and **GDEMA Count** be denoted as \(n\), \(v\), and \(N\), respectively.

We denote the **Moving Average - Generalized Double Exponential** at Index \(t\) for the given Inputs as \(GDEMA^{(N)}_t(X,n,v)\), and we compute it as follows.

For \(N = 1\):

\(GDEMA^{(1)}_t(X,n,v) = (1 + v)EMA_t(X,n) - v EMA^{(2)}_t(X,n))\)When \(v = 1\), GDEMA is equivalent to DEMA.

In the following discussion, we will be taking advantage of the fact that the EMA function is *linear*. That is, for constants \(k_1\) and \(k_2\) and random variables \(X^{(1)}\) and \(X^{(2)}\), the following is true.

For \(N = 2\), we compose the GDEMA function with itself.

\(GDEMA^{(2)}_t(X,n,v) = GDEMA^{(1)}_t\left(GDEMA^{(1)}(X,n,v),n,v\right)\)\(GDEMA^{(2)}_t(X,n,v) = v^2 EMA^{(4)}_t(X,n) - 2v(1+v)EMA^{(3)}_t(X,n) + (1 + v)^2 EMA^{(2)}_t(X,n) \)

For \(N = 3\), we have the following.

\(GDEMA^{(3)}_t(X,n,v) = GDEMA^{(1)}_t\left(GDEMA^{(1)}\left(GDEMA^{(1)}(X,n,v),n,v\right),n,v\right)\)\(GDEMA^{(3)}_t(X,n,v) = -v^3 EMA^{(6)}_t(X,n) + 3v^2(1 + v) EMA^{(5)}_t(X,n) - 3v(1 + v)^2 EMA^{(4)}_t(X,n) + (1 + v)^3 EMA^{(3)}_t(X,n)\)

Note that when \(N = 3\), GDEMA is equivalent to T3.

In general, \(GDEMA^{(N)}_t(X,n,v)\) is the \(N-\)fold composition of GDEMA with itself. Higher values of \(N\) lead to more smoothing and more lag. The GDEMA subgraph is displayed for \(t \geq n\cdot N\).

#### Inputs

- Input Data
- Length
- Multiplier
**GDEMA Count**: This Input controls the number of times GDEMA is composed with itself.

#### Spreadsheet

The spreadsheet below contains comparisons of this study with the DEMA and T3 studies in Spreadsheet format. There are larger discrepancies in the early bars, but eventually the GDEMA study is indistinguishable from the others. This can be seen by adding both GDEMA and DEMA/T3 to the same chart. Save this Spreadsheet to the Data Files Folder.

Open it through **File >> Open Spreadsheet**.

*Last modified Friday, 28th February, 2020.