Hull Moving Average (HMA)

A weighted moving average construction that achieves both speed and smoothness — the rare combination that the EMA/DEMA/TEMA family trades off against.

Updated 2026-05-24
7 min read
intermediate

A moving average that's both fast and smooth — properties the EMA, DEMA, and TEMA family trade off against each other. HMA achieves this by combining three weighted moving averages of different lengths into a single curve.

Placeholder · Video / Clip

HMA(14) vs EMA(14) on MES 5m — through a trend reversal

Author hint: MES 5m, dark theme, ~60-bar window. HMA(14) and EMA(14) overlaid as two lines (HMA in cyan, EMA dimmer). Show one trend reversal — HMA should curve through it cleanly while EMA visibly lags. ≤ 8 seconds, no audio. Save to /public/images/guide/indicators/hull-moving-average/chart.mp4.

What it measures

  • Trend direction with both reduced lag and smoothness. Unlike TEMA, HMA stays smooth even at short periods.
  • Curve quality. The resulting line has a flowing shape that follows price closely without bar-by-bar noise.
  • Slope direction changes early. Often the cleanest "trend turned" signal in the moving-average family.

Formula

How AlgoLift computes it
HMA(n) = WMA(2 × WMA(price, n/2) − WMA(price, n), √n)

Three weighted moving averages stacked: a half-period WMA, a full-period WMA, their weighted difference, then a final WMA over the square root of the period to smooth the result.

The half-period WMA captures recent direction quickly. Subtracting the full-period WMA cancels the lag introduced by smoothing. The final square-root-period WMA filters out the noise that the cancellation amplifies. Net result: fast and smooth, which sounds impossible until you see the curve.

Developed by Alan Hull in 2005.

Inputs in AlgoLift

SettingDefaultRangeNotes
Period142–500Lookback in bars. Common periods are 9, 14, 21, 50.

Recommended periods

  • 9 (fast): Short-term scalping. Smooth enough to be readable, fast enough to catch quick moves.
  • 14 (default): Intraday day-trading.
  • 21–34 (medium): Swing-trade entries. HMA's smoothness becomes more valuable at slightly longer periods.
  • 50+: Long-term reference. At this length most users prefer SMA or EMA — HMA's complexity stops paying off.

Outputs in AlgoLift

HandleTypePlottedNotes
HMANumericAlwaysThe HMA line. The flowing curve is the indicator's signature.
SlopeNumericOn selectBar-over-bar change. The cleanest slope output of any moving average — sharp changes here often precede price turns.
Placeholder · Screenshot

HMA node — default state

Author hint: The HMA node on a fresh canvas with default Period=14. Both output handles labeled. Dark theme. Tight crop. Save to /public/images/guide/indicators/hull-moving-average/node.png.

How to read it

  • Price above HMA: Up-state with strong confirmation.
  • Price below HMA: Down-state with strong confirmation.
  • HMA slope changes color/direction: The cleanest reversal signal available from a moving average. Many strategies color the HMA line based on slope direction for instant visual feedback.
  • HMA flattening: The line losing slope (without flipping) often indicates loss of momentum before a reversal.
Key Takeaway

HMA is the moving average to reach for when you need both responsiveness and a clean line. The slope output is the most useful in the moving-average family — sharp slope flips precede price turns more reliably than EMA or DEMA equivalents.

Best in / worst in

Best in mid-frequency intraday strategies (5m–30m bars), swing setups, and anywhere a visually clean trend line aids strategy logic. The slope output is especially valuable.

Worst in very-low-timeframe scalping (sub-1m bars) where TEMA's additional speed matters more than HMA's smoothness, and in markets dominated by sharp news-driven gaps — HMA's smoothing can mask the gap until well after the move.

Three setups

1. HMA slope-based regime filter

The single cleanest use of HMA. Use the slope output as a binary regime flag.

  • Long-only mode: HMA(21) slope > 0 — strategy permitted to take longs only.
  • Short-only mode: HMA(21) slope < 0 — strategy permitted to take shorts only.
  • Flat: HMA(21) slope within ±0.1 of zero — strategy paused.

The clean slope means fewer regime flips than with EMA-based equivalents.

Placeholder · Screenshot

HMA slope as a regime gate

Author hint: Node graph showing HMA(21) Slope output feeding two parallel comparisons (slope > 0 and slope < 0) that gate two Entry nodes for long-only and short-only modes. Save to /public/images/guide/indicators/hull-moving-average/setup-01.png.

2. HMA reversal entry

Trade the slope flip directly.

  • Long: HMA(14) slope was ≤ 0 for 3+ bars AND just crossed to > 0.
  • Short: Symmetric.

Cleaner than a TEMA equivalent and earlier than an EMA equivalent.

3. HMA pullback to slow EMA

Use HMA on the entry timeframe and a slower EMA as the pullback target.

  • Long: HMA(14) slope > 0 (uptrend) AND price touches EMA(50) AND HMA(14) > EMA(50).
  • Short: Symmetric.

The HMA confirms the trend; the EMA defines the pullback level.

Advanced patterns in AlgoLift

HMA slope for trailing stop logic. Wire HMA's Slope output into a comparison: once slope crosses zero against your position, close the trade via Set Exit Condition. Acts as a momentum-based trailing exit that doesn't require ATR tuning. Combine with a hard stop loss as a safety floor.

HMA on entry timeframe, SMA(200) on regime timeframe. Standard execution-vs-regime split — HMA for the fast entries, SMA(200) on a higher timeframe for the regime kill-switch. Wire both as separate data series in the Visual Builder.

HMA as the basis for a Cluster. HMA + slope-based exit + ATR-based stop is a compact 5-node strategy that works across many instruments. Save it as a Cluster once.

Common mistakes

  • Treating HMA as universally better than EMA. It's better at one specific task — extracting a clean slope signal from short periods. For long-period regime filters, plain SMA is more stable. For sub-1-minute scalping, TEMA reacts faster.
  • Plotting HMA without using the slope. The line itself is similar to other moving averages. The slope is the unique value-add — strategies that ignore it leave the main feature unused.
  • Combining HMA with itself at different periods. HMA(9) crossing HMA(21) is plausible but rarely outperforms an HMA + EMA pair at the same lengths. The constructions are similar enough that the crossovers fire on the same noise.
Common Misconception
Myth
HMA is just a marketing improvement on EMA.
Reality
HMA solves a real problem — the speed-vs-smoothness tradeoff that EMA and its successors couldn't escape — via a genuinely different construction (weighted MA stacking, not nested smoothing). The slope output in particular is meaningfully cleaner than EMA's. Whether the difference matters depends on whether your strategy uses slope as a primary signal.