Average Directional Index (ADX) (Trend)

Helps measure the strength of a trend, whether its up or down.

The Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI) are derived from smoothed averages of these differences and measure trend direction over time. These two indicators are often collectively referred to as the Directional Movement Indicator (DMI).

The Average Directional Index (ADX) is in turn derived from the smoothed averages of the difference between +DI and -DI; it measures the strength of the trend (regardless of direction) over time.

Directional movement is positive (plus) when the current high minus the prior high is greater than the prior low minus the current low. This so-called Plus Directional Movement (+DM) then equals the current high minus the prior high, provided it is positive. A negative value would simply be entered as zero.

Directional movement is negative (minus) when the prior low minus the current low is greater than the current high minus the prior high. This so-called Minus Directional Movement (-DM) equals the prior low minus the current low, provided it is positive. A negative value would simply be entered as zero.

Lets Denote:

Calculation:

  1. Calculate the True Range for each day

$$ \text{TR} = \max(\text{High} - \text{Low}, |\text{High} - \text{Previous Close}|, |\text{Low} - \text{Previous Close}|) $$

  1. Plus Directional Movement (+DM) and Minus Directional Movement (-DM) for each day

$$ +DM = \begin{cases} \text{High}t - \text{High}{t-1} & \text{if } (\text{High}t - \text{High}{t-1}) > (\text{Low}_{t-1} - \text{Low}_t) \text{ and } (\text{High}t - \text{High}{t-1}) > 0 \\ 0 & \text{otherwise} \end{cases} $$

$$ -DM = \begin{cases} \text{Low}_{t-1} - \text{Low}t & \text{if } (\text{Low}{t-1} - \text{Low}t) > (\text{High}t - \text{High}{t-1}) \text{ and } (\text{Low}{t-1} - \text{Low}_t) > 0 \\ 0 & \text{otherwise} \end{cases} $$

  1. Smoothed Average True Range:

$$ \text{Smoothed ATR} = \text{Smooth the TR values using a moving average} $$

  1. Calculate the (+DI) amd the (-DI)

$$ +DI = \left( \frac{\text{Smoothed +DM}}{\text{Smoothed ATR}} \right) \times 100 $$