Skip to content
AlgoBeam

Hull Moving AverageHMA

Answers whether the trend has turned, with most of the lag of a conventional average engineered out — at the cost of a line that can overshoot.

TrendOverlayIntermediate

On a chart

Hull Moving Average on NASDAQ:TSLA, 1-hour bars. The widget is interactive — change the instrument or the timeframe and check whether the description still holds.

StudySTD;Hull_MA
Live market data by TradingView

How it works

The Hull moving average is an attempt to have it both ways: the smoothness of a long average with most of the delay removed. It does this with a construction rather than a new kind of smoothing. Take a weighted average of the full length and a weighted average of half that length. The half-length line leads the full-length one, so the difference between them is a rough measure of the lag. Double the fast line, subtract the slow one, and the result is a series projected forward past that delay. It is jagged, so it is smoothed once more with a short weighted average whose length is the square root of the original.

The result is visibly different from any single average. The HMA hugs price through a trend and turns within a bar or two of a genuine reversal, which is why it has become the colour-changing centre line of so many trading templates. On a clean, sustained move it looks close to prescient next to a 50-period SMA.

The mechanism has a direct consequence that users often miss: because the line is built by extrapolating a difference, it can travel outside the range of the data that produced it. An overshoot at the end of a fast move is not a bug, it is what a lag-cancelling filter does when its input decelerates. That is also why the HMA is a poor support or resistance reference — it is not a mean, and price has no reason to respect it.

Where it fits: the HMA is a direction tool, not a level tool. Traders use its slope as a regime read — rising means long-only conditions, falling the opposite — and pair it with something that supplies a defined invalidation point, such as an ATR-based stop or a structural swing level. If you want a line to place orders against, use a simple or volume-weighted average. If you want the earliest defensible read on whether the trend is still up, the HMA is one of the better answers.

Calculation

The arithmetic in words, in the order it happens.

Compute a weighted moving average of the source over N periods and a second weighted moving average over N/2 periods, rounding to whole bars. Build a raw series equal to twice the half-length WMA minus the full-length WMA. Then take a weighted moving average of that raw series over the square root of N, again rounded. For the default N of 9 that means a 4-period WMA and a 9-period WMA feeding a final 3-period WMA.

Source

An AlgoBeamScript implementation of the formula above, written by us from the arithmetic so the code and the calculation agree line for line.

Loading the implementation…

Runs unchanged on the platform and in the AlgoBeamTS runtime. The language reference is in the documentation.

Inputs

Defaults are the values most charting packages ship with. They are conventions, not optimal settings — the right length depends on your instrument and your holding period.

InputDefaultWhat it changes
Length9Drives all three internal averages, since the half-length and the square-root smoothing are derived from it. Values such as 9 or 16 give a fast trading line; 49 or 81 produce a smooth regime line that still turns earlier than a same-length SMA.
SourceCloseThe input series. Because the construction amplifies recent differences, a noisy source produces visible overshoot; median or typical price calms the line without adding lag.

How to read it

What practitioners take from the plot. Read these as descriptions of market state, not as entry signals.

HMA slope turning up
The earliest of the moving-average family to signal that recent bars have overtaken the trend. Treat it as a prompt to re-examine the chart, not as a standalone entry.
Price riding the HMA without touching it
An accelerating trend: the lag-cancelled line is tracking price so closely that pullbacks never reach it. Often the phase immediately before exhaustion.
HMA overshooting past a price extreme
An artefact of the extrapolation once a fast move decelerates. It says the rate of change has collapsed, not that price traded where the line is.
Slope alternating every few bars
Range conditions. The lag-cancelling construction is least stable when there is no trend to lead.

Limitations

Where this indicator misleads. None of these are fixed by a better parameter.

  • Lag reduction is bought with overshoot. The line can print values outside the recent price range, which makes it unusable as a support, resistance or stop reference.
  • In sideways markets it flips direction faster than any conventional average, so a system that trades every colour change will churn itself to death.
  • It is a derived series three levels deep, so its value on the newest bar can revise noticeably as that bar closes — a real problem for anyone acting on an unclosed candle.
  • Being fast does not make it right: on gappy or news-driven instruments it will lead you faithfully into a move that reverses the next session.

Educational reference. This page explains how an indicator is built and how it is commonly read. It is not investment advice, not a recommendation and not a signal service. No indicator is profitable on its own — each is a way of describing a market, and any rule built on one has to be tested with realistic costs before it is traded.

Ready when you are

Reading it is half of it.

The write-up tells you how Hull Moving Average is supposed to behave. A backtest tells you how it actually behaved on your instrument, over your timeframe, with spread and commission included.

  • No card required
  • Cancel anytime
  • 14-day Ultimate trial