#### Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Leading Indicator

# Technical Studies Reference

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

# Leading Indicator

This study calculates and displays a Leading Indicator and its Moving Average for the data given by the **Input Data** Input. This study is an ACSIL implementation of the Indicator given in Figures 16.5 and 16.6 of the book *Cybernetic Analysis for Stocks and Futures* by John Ehlers.

Let \(X\) be a random variable denoting the **Input Data**, and let \(X_t\) be the value of \(X\) at Index \(t)\. Let the **Length 1**, **Length 2**, and **Moving Average Length** Inputs be denoted as \(n_1\), \(n_2\), and \(n_{MA}\), respectively.

We define two smoothing constants, denoted as \(\alpha^{(1)}(n_1)\) and \(\alpha^{(2)}(n_2)\), and we compute them as follows.

\(\displaystyle{\alpha^{(1)}(n_1) = \frac{2}{n_1 + 1}}\)\(\displaystyle{\alpha^{(2)}(n_2) = \frac{2}{n_2 + 1}}\)

Next, we denote a function called the Lead as \(L_t(X,n_1\), and we compute it as follows.

\(\displaystyle{L_t(X,n_1) = 2X_t + \left(\alpha^{(1)}(n_1) - 2\right)X_{t - 1} + \left(1 - \alpha^{(1)}(n_1)\right)L_{t - 1}(X,n_1)}\)We now denote the **Leading Indicator** as \(LI_t(X,n_1,n_2)\), and we compute it as follows.

Finally, we denote the Average Leading Indicator as \(\overline{LI}_t(X,n_1,n_2,n_{MA})\), and we compute it using the Exponential Moving Average as follows.

\(\displaystyle{\overline{LI}_t(X,n_1,n_2,n_{MA}) = EMA_t(LI(X,n_1,n_2),n_{MA})}\)**Note**: Depending on the setting of the Input **Moving Average Type**, the Exponential Moving Average in the above formula could be replaced with a Linear Regression Moving Average, a Simple Moving Average, a Weighted Moving Average, a Wilders Moving Average, a Simple Moving Average - Skip Zeros, or a Smoothed Moving Average.

#### Inputs

*Last modified Monday, 26th September, 2022.