Ehlers Directional Movement with Hann (DMH)
Category: momentum, trend
A directional indicator based on John Ehlers' methodology, combining standard Directional Movement (DM) with EMA smoothing and a Hann window Finite Impulse Response (FIR) filter.
Formula
\begin{cases} \Delta H = H_t - H_{t-1} \\ \Delta L = L_{t-1} - L_t \\ +DM = \text{if } \Delta H > \Delta L \text{ and } \Delta H > 0 \text{ then } \Delta H \text{ else } 0 \\ -DM = \text{if } \Delta L > \Delta H \text{ and } \Delta L > 0 \text{ then } \Delta L \text{ else } 0 \\ DM_{diff} = +DM - (-DM) \\ EMA_t = \alpha \cdot DM_{diff} + (1 - \alpha) \cdot EMA_{t-1} \\ w_i = 1 - \cos\left(\frac{2\pi i}{N+1}\right) \\ DMH = \frac{\sum_{i=1}^{N} w_i \cdot EMA_{t-i+1}}{\sum_{i=1}^{N} w_i} \end{cases}
Inputs
- period (default: 14)
See signal primitives and every published strategy that uses Ehlers Directional Movement with Hann (DMH) on WOBR StrategyVerse.