Directional Movement Index (DMI)
The Directional Movement Index (DMI) is a technical indicator developed by J. Welles Wilder as part of his book “New Concepts in Technical Trading Systems,” published in 1978. The DMI assesses the strength of a price trend and helps traders distinguish between trending and non-trending conditions. It serves as a tool for both trend-following and filtering out market noise, thus aiding in more informed decision-making in financial markets.
Components of DMI
The DMI consists of three main components:
- Plus Directional Indicator (+DI): This indicator measures upward movement or the strength of positive price changes. It captures the largest part of daily high movements over a specified period.
- Minus Directional Indicator (-DI): This element captures downward price movements and shows the strength of negative price changes, considering the largest part of daily low movements over a specified period.
- Average Directional Index (ADX): This component specifies the overall strength of the trend, regardless of its direction. The ADX is derived from the smoothed averages of the difference between +DI and -DI.
Calculating DMI
To understand the DMI components, we must first calculate the True Range (TR), Plus Directional Movement (+DM), and Minus Directional Movement (-DM).
- True Range (TR): The maximum range of price movement for a given period, which is derived as follows:
-
( TR = \max[(Hight - Lowt), Hight - Closet-1 , Lowt - Closet-1 ] )
-
- Plus Directional Movement (+DM): Only the positive part of price movement between the current and previous periods:
- If ( Hight - High_{t-1} > Low_{t-1} - Lowt ) and ( Hight - High_{t-1} > 0 ), then ( +DM = Hight - High_{t-1} ); otherwise, ( +DM = 0 )
- Minus Directional Movement (-DM): The negative part of price movement between the current and previous periods:
- If ( Low_{t-1} - Lowt > Hight - High_{t-1} ) and ( Low_{t-1} - Lowt > 0 ), then ( -DM = Low_{t-1} - Lowt ); otherwise, ( -DM = 0 )
The smoothed averages of +DM and -DM over a specified period (commonly 14 days) are then calculated to get the Plus and Minus Directional Indicators:
- ( +DI = \left( \frac{SMMA(+DM)}{TR} \right) \times 100 )
- ( -DI = \left( \frac{SMMA(-DM)}{TR} \right) \times 100 )
Where SMMA refers to the smoothed moving average. The ADX is then computed as the smoothed average of the Directional Movement Index (DX):
-
( DX = \left( \frac{ +DI - -DI }{+DI + -DI } \right) \times 100 ) - ( ADX = SMMA(DX) )
Interpreting DMI
Trend Strength
The ADX value represents the overall trend strength on a scale from 0 to 100:
- 0-20: Weak trend or market is likely moving sideways.
- 20-40: Building or moderately strong trend.
- 40-60: Strong trend.
- 60-100: Very strong trend.
Directional Indicators
- When +DI is above -DI, it indicates an upward trend.
- When -DI is above +DI, it suggests a downward trend.
Crossovers
Crossover points between +DI and -DI are particularly significant:
- A bullish crossover occurs when +DI crosses above -DI, suggesting a potential buying signal.
- A bearish crossover occurs when -DI crosses above +DI, signaling a potential selling opportunity.
DMI in Algorithmic Trading
Algorithmic trading systems often incorporate DMI as part of complex trading algorithms. DMI offers clear quantitative criteria, enabling trading systems to automatically generate buy or sell signals. By integrating DMI with other indicators like Moving Average Convergence Divergence (MACD), Relative Strength Index (RSI), or Bollinger Bands, algorithms can enhance decision-making accuracy and potentially improve profitability.
Here are a couple of use cases of the Directional Movement Index in algorithmic trading:
Use Case 1: Trend Following Systems
A trend-following algo might use ADX to confirm the existence of a trend. The system might:
- Enter long positions when ADX exceeds a threshold (e.g., 25) and +DI is above -DI.
- Enter short positions when ADX exceeds the threshold, but -DI is above +DI.
- Exit positions when the ADX falls below a certain value (indicating weakening trend strength).
Use Case 2: Range-Bound Market Filtering
Another use case is a range-bound or sideways market filtering:
- If ADX drops below a certain threshold (e.g., 20), the algo may avoid opening new directional trades as this indicates less likelihood of trend formation.
- This filter can also be applied to trend-following strategies to avoid losses during non-trending periods.
Popular Algorithmic Trading Providers
Several algorithmic trading platforms and providers incorporate DMI in their strategies. Some notable ones include:
- QuantConnect: A cloud-based algorithmic trading platform QuantConnect
- AlgoTrader: An institutional multi-asset algorithmic trading software AlgoTrader
- Quantopian: Another platform providing tools for algorithmic trading (although it ceased operations, it was popular for educational purposes)
Conclusion
The Directional Movement Index (DMI) is a powerful tool in the arsenal of both manual and algorithmic traders. Its ability to quantify trend strength and deliver clear buy and sell signals makes it invaluable for crafting sophisticated trading strategies. When used in conjunction with other technical indicators, DMI offers enriched insights and robust trading opportunities, further emphasizing its enduring significance in the world of financial markets.