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

# Technical Studies Reference

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

### Stochastic Momentum Indicator

This study calculates and displays both the Stochastic Momentum Indicator and its Exponential Moving Average.

Let \(H\), \(L\), and \(C\) be random variables denoting the High, Low, and Closing Prices, respectively, and let their respective values at Index \(t\) be \(H_t\), \(L_t\), and \(C_t\). Let the Inputs **%D Length**, **%K Length**, and **EMA Length** be denoted as \(n_D\), \(n_K\), and \(n_{EMA}\), respectively. We denote the Highest High and the Lowest Low over a sliding window of Length \(n_K\) terminating at Index \(t\) as \(\max_t(H,n_K)\) and \(\min_t(L,n_K)\), respectively. Explicit formulas for these quantities are given below.

\(\min_t(L,n_K) = \min\{L_{t - n_K + 1},...,L_t\}\)

We use these quantities to compute the Range and the Relative Range, each of which depends on \(n_K\). The respective values of these quantities at Index \(t\) are denoted as \(Range_t(n_K)\) and \(RelRange_t(n_K)\), and we compute these for \(t \geq \max\{n_K,n_D\} as follows.

\(Range_t(n_K) = \max_t(H,n_K) - \min_t(L,n_K)\)\(RelRange_t(n_K) = C_t - \displaystyle{\frac{\max_t(H,n_K) + \min_t(L,n_K)}{2}}\)

We denote the value of the **Stochastic Momentum Indicator** for the given Inputs at Index \(t\) as \(SMI_t(n_K,n_D)\), and we compute it for \(t \geq \max\{n_K,n_D\} in terms of Exponential Moving Averages as follows.

We denote the Average of the **Stochastic Momentum Indicator** for the given Inputs at Index \(t\) as \(\overline{SMI}_t(n_K,n_D,n_{EMA})\), and we compute it for \(t \geq \max\{n_K,n_D\} as follows.

In the formulas for both the **Stochastic Momentum Indicator** and its Average, any Statistical Functions that are written without a subscript are understood to be Random Variables for the Statistical Functions in which they are contained.

In addition to the Subgraphs of \(SMI_t(n_K,n_D)\) and \(\overline{SMI}_t(n_K,n_D,n_{EMA})\), this study also displays horizontal lines whose levels are determined by the Inputs **Overbought Value** and **Oversold Value**.

#### Inputs

#### Spreadsheet

The spreadsheet below contains the formulas for this study in Spreadsheet format. Save this Spreadsheet to the Data Files Folder.

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

*Last modified Wednesday, 03rd January, 2018.