Hull Moving Average (HMA) explained: how to read it

By Oalgo · Last reviewed

The Hull Moving Average (HMA, also called the Hull MA) is a moving average built to follow price more closely than an SMA or EMA of the same length. It combines three weighted averages so that it turns sooner. The cost is that it can overshoot price after a sharp move.

Chart: example prices with a 9-period HMA and, for comparison, a 9-period SMA as a thin dashed line. The HMA stays closer to price and turns sooner than the SMA.PriceHMA 9SMA 9, for comparison
Example prices, made up for this page. Length 9, a common setting.

How is the HMA calculated?

#
  • A weighted moving average (WMA) gives the newest candle the most weight: the weights run 1, 2, 3 and so on up to the length, from the oldest candle to the newest.
  • Take a WMA of the close over half the length, rounded down.
  • Take a WMA of the close over the full length.
  • Raw line = 2 × the half-length WMA − the full-length WMA. This pushes the line toward the newest prices.
  • HMA = a WMA of the raw line over the square root of the length, rounded down.
  • For length 9, the half length is 4 and the square root is 3.

The extra steps need extra candles, so the first HMA value appears after the length plus the square root minus 1 candles. For length 9 that is the 11th candle. A new HMA block in the builder starts with a period of 14, and you can change it.

What does a worked example look like?

#

Length 4, so the half length is 2 and the square root is 2. The closes of six candles are 10, 10, 12, 12, 15 and 15.

CandleCloseWMA 2WMA 42 × WMA 2 − WMA 4HMASMA 4
41212.011.412.6(not yet)11.0
51514.013.015.014.212.25
61515.014.115.915.613.5

Candle 5 shows one step: WMA 2 = (12 × 1 + 15 × 2) ÷ 3 = 14. The HMA of candle 5 = (12.6 × 1 + 15.0 × 2) ÷ 3 = 14.2. After the jump to 15, the SMA is still at 12.25 and then 13.5. The HMA is at 14.2 and then 15.6: it has caught up with price and passed the close of 15. That overshoot is normal for the HMA.

How do you read the HMA?

#
What you seeWhat it suggests
HMA sloping upRecent closes, with the newest weighted most, are rising.
HMA sloping downRecent closes, with the newest weighted most, are falling.
Price crosses the HMAPrice has moved from one side of this fast-reacting average to the other.
HMA turns from down to upThe latest candles have pushed the weighted average up. It does this sooner than an SMA would, and it can also turn on a small move that then reverses.
HMA beyond price right after a sharp moveThe overshoot: the line has gone past the last close.

A fast average changes direction more often. In a sideways stretch the HMA can turn up and down many times.

How do people use the HMA in rules?

#
  • Price crossing above or below the HMA.
  • A short HMA crossing a longer one, such as 9 and 21. The moving average crossover page has the same idea with SMAs and EMAs.
  • The direction of the HMA, this candle's value above or below the last candle's, as a trend filter.
  • The same rule with an HMA and with an SMA of the same length, to see what the faster line changes.

What can the HMA not tell you?

#

The HMA is still built from past closes and does not say where price goes next. Its speed is paid for with more turns: a rule on it can trade more often and pay more in fees. A length tuned until the past looks good may fail on new prices. Test any rule on past prices with a backtest, then forward test it.

In Oalgo you can tell Oalgo AI your HMA rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.

Read next