Concept
HMA
HMA is a Trend concept. The Library holds 5 implementations, each one a working definition you can pull into Quant.
Hull
Top HMA indicators
5 total
What is the HMA?
The HMA (Hull Moving Average) is a low-lag moving average published by Alan Hull in 2005. It is built entirely from weighted moving averages: take a WMA of half the chosen period, double it, subtract the full-period WMA, then smooth that raw series with a final WMA whose length is the square root of the period. The doubling-and-subtracting step extrapolates the average toward current price, cancelling most of the lag; the short final WMA tames the noise that extrapolation creates.
The result hugs price and turns quickly, which is why HMA slope, rather than price crossing the line, is the standard read: rising for bullish pressure, falling for bearish. The cost is overshoot. Because the formula is partly a projection, the HMA can hook beyond price at sharp V-turns and flip slope repeatedly in chop, where a slower EMA would simply flatten.
The HMA matters because it is one of the cleanest published answers to the central moving-average trade-off, smoothness versus lag. It serves as a baseline in trend systems, as the fast leg in moving average crossovers, and as a smoothing component inside other indicators, sitting alongside ZLEMA and JMA in the low-lag branch of the moving-average family.
How to calculate the HMA
The HMA takes one input, the period n, and is assembled from three weighted moving averages.
- 1Compute two WMAs of price: one over the full period n and one over the half period n/2, rounded to an integer.
- 2Form the raw de-lagged series: two times the half-period WMA minus the full-period WMA. This projects the average toward current price but leaves it noisy.
- 3Smooth the raw series with a WMA whose length is the square root of n, rounded. The output is the HMA.
- 4Read it by slope: charts commonly color the line by whether it rose or fell versus the prior bar, treating slope flips, not price crosses, as the event of interest.
How traders use it
- As a slope-based trend filter: take longs only while the HMA rises and shorts only while it falls. This is the most common deployment, usually drawn as a color-flip line, and is a faster, noisier cousin of the MA slope filter.
- As the fast leg of a crossover pair: an HMA crossing a slower average fires earlier than an EMA of the same length, at the price of more false crosses in ranges.
- As a baseline bias line: price closing above or below a mid-length HMA sets directional bias while entries come from other triggers; it reacts faster than the equivalent dynamic S/R moving average but holds pullbacks less reliably.
- As a smoothing block inside other tools: HMA smoothing is regularly applied to oscillators, volume series, or volatility measures where a plain SMA would add too much delay.
HMA vs similar moving averages
EMA: The EMA reduces lag with exponential weighting but still trails price by construction. The HMA goes further by extrapolating, so it turns sooner and can overshoot; the EMA never overshoots but is always late.
ZLEMA: Both are de-lagging constructions. ZLEMA removes lag by error-correcting the input to an EMA, while the HMA subtracts a full-period WMA from a doubled half-period WMA and re-smooths the result.
WMA: The WMA is the HMA's building block: a single linearly weighted average that still lags. The HMA combines three WMAs specifically to cancel that lag out.
JMA: Both target minimal lag with maximal smoothness. The JMA is an adaptive, proprietary filter that adjusts to market conditions, while the HMA is a fixed, fully public formula anyone can reproduce.
More HMA implementations
Related concepts · Moving-average lineage
Concept family
Trend
100 concepts mapped · 88 in the Library
HMA FAQ
What is a good HMA length?
There is no universal setting. Shorter lengths (roughly 9 to 21) are common when the HMA acts as a signal line, longer ones (55 and up) when it acts as a trend filter. Because the HMA already reduces lag, a long period behaves like a much shorter conventional average, so test lengths on your market rather than importing defaults.
Does the Hull Moving Average repaint?
No. On closed bars the HMA is fixed. Its value on the live bar updates as that bar forms, like any moving average, so a slope flip seen mid-bar can vanish by the close. Evaluating signals only on closed bars is the standard repaint-safe practice.
Is the HMA better than the EMA?
It is faster to turn, not better outright. The HMA's extrapolation buys earlier slope flips at the cost of overshoot and extra flips in choppy conditions. If a method needs a stable pullback anchor, the EMA's steady lag is often the more useful property. Which trade-off wins depends on the system, not the average.
Why does the HMA use the square root of the period?
The final smoothing pass has to be long enough to tame the noise created by the two-WMA extrapolation but short enough not to reintroduce the lag that was just removed. Hull chose the square root of the period as that compromise, keeping the final window small relative to the full lookback.
Can I use the HMA as support and resistance?
It is a weak choice for that job. Because it hugs price and overshoots at turns, price interacts with it constantly, so individual touches carry little information. Slower averages that price reaches only on pullbacks tend to serve better as dynamic levels; the HMA is better used for slope and bias.
Build HMA your way.
Quant writes, tests, and refines it with you — then it runs on LuxAlgo charting or ports to TradingView.


