#### Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Directional Movement Index

# Technical Studies Reference

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

### Directional Movement Index

This study calculates and displays Welles Wilder's Plus and Minus Directional Indicators.

Let \(H\), \(L\), and \(C\) be random variables denoting the High, Low, and Close prices, respectively, and let \(H_t\), \(L_t\), and \(C_t\) be their values at Index \(t\). We denote an Up Move and a Down Move at Index \(t\) as \(\Delta H_t\) and \(-\Delta L_t\), respectively. Initially we have \(\Delta H_0 = -\Delta L_0 = 0\), and for \(t > 0\) compute the Up Move and Down Move as follows.

\(\Delta H_t = H_t - H_{t - 1}\)\(- \Delta L_t = L_{t - 1} - L_t\)

We denote the Positive Directional Movement and Negative Directional Movement at Index \(t\) as \(DM_t^{(+)}\) and \(DM_t^{(-)}\), respectively, and we compute them for \(t \geq 0\) as follows.

\(\displaystyle{DM_t^{(+)} = \left\{\begin{matrix} \Delta H_t & \Delta H_t > -\Delta L_t \space and \space \Delta H_t > 0 \\ 0 & \Delta H_t \leq -\Delta L_t \space or \space \Delta H_t \leq 0 \end{matrix}\right .}\)\(\displaystyle{DM_t^{(-)} = \left\{\begin{matrix} -\Delta L_t & -\Delta L_t > \Delta H_t \space and \space -\Delta L_t > 0 \\ 0 & -\Delta L_t \leq \Delta H_t \space or \space -\Delta L_t \leq 0 \end{matrix}\right .}\)

Let the **Length** Input be denoted as \(n_{DX}\). We compute the Welles Sum the Postive Directional Movement, Negative Directional Movement, and True Range for \(t \geq 0\). The values of these Welles sums at Index \(t\) are respectively denoted as \(WS_t\left(DM^{(+)},n_{DX}\right)\), \(WS_t\left(DM^{(-)},n_{DX}\right)\), and \(WS_t(TR,n_{DX})\).

Finally, we denote the indicators of the **Directional Movement Index** at Index \(t\) as \(DI_t^{(+)}(n_{DX})\) (Positive Directional Indicator) and \(DI_t^{(-)}(n_{DX})\) (Negative Directional Indicator). These are both initially equal to zero, and we compute them for \(t \geq 0\) as follows.

\(\displaystyle{DI_t^{(-)}(n_{DX}) = \left\{\begin{matrix} 100\cdot\frac{WS_t\left(DM^{(-)},n_{DX}\right)}{WS_t(TR,n_{DX})} & WS_t(TR,n_{DX}) \neq 0 \\ DI_{t - 1}^{(-)}(n_{DX}) & WS_t(TR,n_{DX}) = 0 \end{matrix}\right .}\)

**Note**: The values of the **Directional Movement Index** Indicators are displayed for \(t \geq n_{DX}\).

#### 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**.

**Note**: The percent errors in this spreadsheet are larger than those found in spreadsheets for other studies because the DMI study uses a different rounding scheme.

*Last modified Monday, 04th June, 2018.