# Technical Studies Reference

This study calculates and displays the Welles Wilder's Average Directional Index (ADX).

The ADX is based on calculations similar to those used in the Directional Movement Index. Just as in that study, the DX Length Input is denoted as $$n_{DX}$$. The Directional Indicators $$DI_t^{(+)}\left(n_{DX}\right)$$ and $$DI_t^{(-)}\left(n_{DX}\right)$$ are calculated slightly differently here, as shown below.

$$\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 \\ 100 & WS_t(TR,n_{DX}) = 0 \end{matrix}\right .}$$

$$\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 \\ 100 & WS_t(TR,n_{DX}) = 0 \end{matrix}\right .}$$

The Directional Index at Index $$t$$ is denoted as $$DX_t(n_{DX})$$. This is initially equal to zero, and we compute it for $$t \geq 0$$ as follows.

$$\displaystyle{DX_t(n_{DX}) = \left\{\begin{matrix} 100\cdot\frac{\left|DI^{(+)}(n_{DX}) - DI^{(-)}(n_{DX})\right|}{DI^{(+)}(n_{DX}) + DI^{(-)}(n_{DX})} & DI^{(+)}(n_{DX}) + DI^{(-)}(n_{DX}) \neq 0 \\ DX_{t - 1}(n_{DX}) & DI^{(+)}(n_{DX}) + DI^{(-)}(n_{DX}) = 0 \end{matrix}\right .}$$

Let the DX Mov Avg Length Input be denoted as $$n_{\overline{DX}}$$. We denote the ADX at Index $$t$$ as $$ADX_t(n_{DX},n_{\overline{DX}})$$, and we compute it in terms of a Wilders Moving Average for $$t \geq n_{DX} + n_{\overline{DX}} - 1$$ as follows.

$$\displaystyle{ADX_t(n_{DX},n_{\overline{DX}}) = \left\{\begin{matrix} \frac{1}{n_{DX} + n_{\overline{DX}}}\sum_{i = 0}^{n_{\overline{DX}} - 1}DX_{t - i}(n_{DX}) & t = n_{DX} + n_{\overline{DX}} - 1 \\ WWMA_t(DX(n_{DX},n_{\overline{DX}}) & t > n_{DX} + n_{\overline{DX}} - 1 \end{matrix}\right .}$$

For an explanation of the Sigma ($$\Sigma$$) notation for summation, refer to our description here.

#### Inputs

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.