Skip to content
All library documents

Directional Movement with Hann Window Smoothing

Article ProRealCode

Summary

This document presents John Ehlers’s Directional Movement with Hann windowing indicator, a smoothed variant of directional movement. It compares the latest high and low changes, assigns the larger positive move to upward or downward directional movement, and forms a signed series from their difference. That series is first smoothed recursively, then filtered with a finite impulse response calculation weighted by a Hann window and normalized by the sum of its weights.

The provided implementation uses a period of 14 and plots the resulting indicator against a zero reference, so positive and negative values distinguish directional bias. The document attributes the method to Ehlers and notes its publication in a December 2021 technical analysis magazine. It offers code and a brief description, but no chart examples, trading rules, or performance tests. The indicator is therefore a signal construction rather than a demonstrated standalone strategy; users would need to test its behavior and parameter sensitivity on their own markets and time frames.

Key ideas

  • The indicator derives signed directional movement by comparing upward and downward price changes.
  • It applies recursive smoothing followed by a normalized Hann-window finite impulse response filter.
  • The output’s sign provides a directional reading relative to a zero line.
  • The document supplies an implementation and attribution but no trading results or testing evidence.

Tags

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