Skip to content
All library documents

Directional Movement Smoothed with a Hann Window

Article TradingView scripts

Summary

This indicator modifies classic directional movement by first comparing changes in highs and lows. It retains positive or negative movement only when that side’s move is larger and positive, then takes the difference between the two directional movement series. The difference is smoothed with a Wilder-style running average and then passed through a finite impulse response filter weighted by Hann coefficients.

The resulting line is shown around a zero level, with color indicating whether the signal is positive or negative. The lookback length is adjustable. The document presents the calculation and its connection to John Ehlers’s work on applying Hann windowing to trading indicators, but it offers no comparative test results or trading rules. It therefore explains an indicator construction, not evidence that the smoothing improves forecasting or returns; users would need to evaluate its behavior and parameters on their own data.

Key ideas

  • The indicator selects the larger positive change between consecutive highs and lows as directional movement.
  • It subtracts negative movement from positive movement and smooths the result with a running average.
  • A Hann-weighted finite impulse response filter is applied to the smoothed series.
  • The zero line and signal color show the direction of the resulting measure.
  • The source describes the calculation but supplies no performance evidence or entry and exit rules.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.