Legendary trader and author J. Welles Wilder Jr. introduced the directional movement index, or DMI, in 1978. Wilder wanted an indicator that could measure the strength and direction of a price movement so traders could avoid false signals. The DMI is actually two different standard indicators, one negative and one positive, that are plotted as lines on the same chart. A third line, the average directional index, or ADX, is nondirectional but shows movement strength.
There is a different formula used for each of the three indicators. The DMI is built on a ratio of exponential moving averages, or EMAs, of the upward price movements (U), downward price movements (D) and the true range of the prices (TR). These are often expressed in an equation as EMAUP, EMADOWN and EMATR.
The computations for the various EMAs are complex and numerous. Once they are found, however, they can be used to compute the directional movement, or DM, for whatever time interval is selected. The standard interval is 14 periods. The returned value of DM can be positive (+DM), negative (-DM) or zero.
Negative Directional Movement (-DM) is calculated as:−DM=EMATREMADOWNwhere:EMADOWN=exponential moving average of downward price movementsEMATR=exponential moving average of the true range of prices
Positive Directional Movement (+DM) is calculated as:
+DM=EMATREMAUPwhere:EMAUP=exponential moving average of upward price movementsEMATR=exponential moving average of the true range of prices
Once those values generate returns, they help form the directional index (DX), which is calculated as:
Once the DX value is found, average directional index (ADX) is calculated as:
ADX=n+12(DXn−EMADXn−1)EMADXn−1where:EMADX=exponential moving average of directional indexDX=directional indexn=time interval
The chart reflects the values of +DI, -DI and ADX over the course of the time interval.