Directional Movement (DM): Complete Guide for Algorithmic Trading

The Directional Movement indicator — commonly abbreviated as DM — is a trend-measuring tool developed by J. Welles Wilder. It quantifies the magnitude of upward and downward price movement, giving algorithmic traders a precise way to determine whether a market is trending and in which direction. Directional Movement forms the foundation of the ADX system and the Directional Indicator (+DI / -DI) framework.

What Is the Directional Movement?

The directional movement indicator is a calculation that captures how far price has moved beyond the range of the previous candle. It splits movement into two values. DM+ measures upward movement. DM- measures downward movement.

When DM+ is dominant, buyers are consistently extending the price range higher with each candle. When DM- is dominant, sellers are pushing the range lower. If both values are small, price is moving sideways without meaningful directional commitment.

DM is a raw, unsmoothed measurement. It is typically processed further to produce the +DI and -DI lines, or combined with Average True Range to normalise the values. Understanding DM in its base form gives you a clearer picture of what those derived indicators are actually measuring.

How Is the Directional Movement Calculated?

The logic is straightforward once you understand what it is measuring.

DM+ equals today’s high minus yesterday’s high — but only when today’s high exceeds yesterday’s high. If today’s high is lower, DM+ is zero for that period.

DM- equals yesterday’s low minus today’s low — but only when today’s low is below yesterday’s low. If today’s low is higher, DM- is zero.

There is one additional rule. If both DM+ and DM- are positive on the same candle, only the larger value counts. The smaller is set to zero. If they are equal, both are zero.

In plain terms: DM measures how far today’s candle reached beyond yesterday’s range — upward or downward. Movement that stays entirely inside yesterday’s range is ignored entirely.

These raw values are then smoothed over a period — Wilder used a 14-period default — to reduce noise and produce the +DI and -DI lines used in live strategies.

How to Read Directional Movement Signals?

Reading the directional movement indicator comes down to three scenarios.

DM+ rising, DM- falling: Buyers are consistently pushing price above the previous candle’s high. The market is in an uptrend. Systematic strategies typically favour long positions in this environment.

DM- rising, DM+ falling: Sellers are consistently pulling price below the previous candle’s low. The market is in a downtrend. Trend-following strategies look to exit longs or take short positions.

Both DM+ and DM- low: Price is not extending meaningfully in either direction. The market is consolidating or ranging. Trend-following strategies often stand aside. Range-based approaches may become active.

The primary signal is a crossover. When DM+ crosses above DM-, it marks the start of a potential upward phase. When DM- crosses above DM+, a downward phase may be beginning. For deeper reading of the DI lines built from DM, see the Directional Indicators (+DI / -DI) guide.

What Are the Best Directional Movement Trading Strategies?

DM Crossover Strategy

The simplest approach uses the crossover directly. Enter long when DM+ crosses above DM-. Exit or consider a short when DM- crosses above DM+. This captures directional shifts at the point of change. It works well in trending markets. It produces false signals in ranging conditions where DM values are small and crossovers are frequent but meaningless.

DM with Trend Confirmation

Pair the DM crossover with a moving average filter. Only act on DM+ signals when price is above its 50-period moving average. Only act on DM- signals when price is below it. This filters out noise in choppy, sideways markets by aligning signals with the higher-level trend direction.

DM with ADX Strength Filter

Use ADX to qualify DM signals. Only trade a DM+ or DM- crossover when ADX is above 20, confirming that a real trend is in place. Below 20, the market is ranging and crossovers are less reliable. This is Wilder’s original intended application of the Directional Movement system — DM and ADX were designed to work together.

What Are Common Directional Movement Mistakes to Avoid?

Trading every crossover without a strength filter: In ranging markets, DM+ and DM- cross frequently. Price moves little. Always confirm trend strength before acting on a crossover. Pairing DM with ADX is the simplest way to do this.

Confusing DM with DI: DM is the raw directional movement value. DI normalises DM against the Average True Range, making values comparable across different assets and timeframes. They are related but not the same. Know which value your strategy is using.

Using too short a smoothing period: A short period creates noisy DM values that produce frequent, low-quality crossovers. Wilder’s 14-period default remains a sensible starting point. Backtest before shortening it.

Ignoring the higher timeframe trend: A DM- crossover inside a strong uptrend may be a temporary correction rather than a reversal. Always consider the broader trend context before acting on a short-term DM signal.

How to Build Directional Movement Strategies in Arrow Algo?

Arrow Algo includes the Directional Movement indicator as a built-in block. You can build and test DM-based strategies entirely through the no-code visual builder — no programming required.

Start by dragging the DM block onto your canvas. It outputs two values: DM+ and DM-. Connect the DM+ output to a comparison block. Connect the DM- output to a second comparison block. Set the logic to detect when DM+ is greater than DM- — this becomes your long entry signal.

To add the ADX strength filter, drag an ADX block onto the canvas. Connect its output to a threshold block set at 20. Use an AND logic block to combine the DM crossover condition with the ADX confirmation. Your strategy now only fires when both conditions are true — a genuine trending environment.

Add a moving average block as a higher-timeframe direction filter. Connect all conditions to your entry and exit blocks. Every step is visual. There is nothing to code. Backtest directly in Arrow Algo using historical data from your chosen exchange. Adjust the DM period in the block settings and compare results across different parameter values. Once satisfied, activate the strategy for live trading.

What Are the Key Takeaways?

  • The directional movement indicator (DM) measures how far price extends beyond the previous candle’s range — upward (DM+) or downward (DM-)
  • DM forms the foundation of the ADX and Directional Indicator (+DI / -DI) system developed by J. Welles Wilder
  • DM+ dominant signals an uptrend building. DM- dominant signals a downtrend. Both low signals consolidation.
  • Crossovers between DM+ and DM- indicate potential trend changes — but require strength confirmation
  • Always pair DM with ADX to confirm trend strength before acting on crossover signals
  • Avoid trading DM crossovers in low-ADX, ranging market conditions
  • Arrow Algo’s no-code visual builder lets you build, test, and deploy DM strategies without writing any code
Educational disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results.

Disclaimer: The information provided in this article is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.

Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who’ve made the switch to systematic trading.

About the Author

Author Bio