How HMA (Hull Moving Average) Is Calculated

Learn how HMA is calculated inputs and limits for verification.

Direct answer

The Hull Moving Average (HMA) is calculated from weighted moving averages (WMA) of the same price series using a main length and a derived “half” length. A typical definition is:

  1. Let n be the HMA length.
  2. Compute WMA(n/2) of the price series.
  3. Compute WMA(n) of the price series.
  4. Create an intermediate series:
    • 2 · WMA(n/2) − WMA(n)
  5. Finally smooth that intermediate series using a WMA with length √n:

HMA(n) = WMA( √n, 2 · WMA(n/2) − WMA(n) )

This gives an average that aims to react faster than a single moving average while reducing some lag.

Mechanism and definition

To explain how the formula works, it helps to separate the stable mechanics (the math structure) from the variable conditions (how you choose inputs and how you handle practical details).

1) The inputs

  • Price series: a sequence of data points (for example, a close price per bar). HMA is defined on a series, not on a single price.
  • Length n: a positive number that controls smoothness and responsiveness.

2) The key building block: Weighted Moving Average (WMA)

A WMA is a moving average where more recent observations receive more weight than older ones. For a chosen length L, the WMA at time t can be written conceptually as:

  • WMA(L) at t = weighted average of the last L price points ending at t

The exact weighting scheme is typically linear (weights rise with recency), but you must use a consistent WMA definition across all parts of the HMA computation.

3) The HMA data flow

HMA uses three stages:

Stage A: Half-length smoothing

  • Compute WMA(n/2). This tends to respond quicker than WMA(n) because it uses fewer points (less smoothing).

Stage B: Trend-shaping combination

  • Combine the half-length smoothing with the full-length smoothing:
    • 2 · WMA(n/2) − WMA(n)
  • This “difference then scaled” structure is intended to adjust lag by contrasting a faster average (half-length) with a slower one (full-length).

Stage C: Final smoothing with √n

  • Apply WMA again, but to the intermediate series from Stage B, using length √n.
  • Because √n is smaller than n for n>1, this final smoothing attempts to keep the result responsive while tempering noise.

4) Practical assumptions you must state

Because the formula includes n/2 and √n, you need deterministic rules for non-integer lengths:

  • If your platform requires an integer period for WMA, you must decide how to round n/2 and √n (for example, floor, ceil, or nearest).
  • If n is small, √n may collapse to a very small integer, making the final smoothing weaker and the output more jagged.

Evidence or example you can reproduce

Below is a self-contained example outline (no live prices assumed). You can reproduce it with any numeric price series.

Example setup

  • Choose a length n = 16.
  • Then:
    • n/2 = 8
    • √n = 4
  • Choose an agreed WMA definition (e.g., linear weights 1..L or any consistent scheme your calculator uses).
  • Let P[t] be your price at time t.

Step-by-step computation (conceptual)

At each time t where enough history exists:

  1. Compute A[t] = WMA(8) of P (last 8 prices ending at t).
  2. Compute B[t] = WMA(16) of P (last 16 prices ending at t).
  3. Build intermediate series:
    • C[t] = 2 · A[t] − B[t]
  4. Compute the final HMA:
    • HMA[t] = WMA(4) of C (last 4 C-values ending at t).

What to verify independently

  • Confirm that your HMA calculator follows the same structure: WMA(n/2) and WMA(n) combined as 2·WMA(n/2) − WMA(n), then smoothed with WMA(√n).
  • Confirm how it rounds n/2 and √n when they are not integers.
  • Confirm that it applies WMA to the correct series (prices for the first WMAs; the intermediate C-series for the final WMA).

Limitations and risks (calculation failures you can check)

HMA can be computed correctly, but interpretation can still fail if you ignore mechanics and data constraints. Key limitations include:

1) Edge effects at the start

You cannot compute WMA(n) until at least n prior data points exist, and you cannot compute the final WMA(√n) until you also have enough intermediate values. As a result:

  • Early HMA values are missing, delayed, or based on shorter effective history depending on implementation.

2) Non-integer length handling changes the result

If a platform converts n/2 or √n to integers differently, HMA values can differ noticeably. This is a common failure mode when comparing two charts that “use HMA” but with different rounding rules.

3) WMA definition must match

A WMA is not just “some weighted average.” If one tool uses linear weights while another uses a different weighting scheme, the HMA output changes even with the same n and the same price series.

4) Sensitivity to noisy inputs and time resolution

Because HMA is a smoothing method applied to a series, its appearance depends on:

  • the chosen price type (e.g., close vs another series), and
  • the data interval (bar size). Historical patterns in one resolution do not guarantee similar behavior in another.

Verification and what to ask next

To independently verify your understanding and avoid mismatches:

  1. Start with a written formula for HMA that matches WMA( √n, 2·WMA(n/2) − WMA(n) ).
  2. Specify your n, your WMA weight scheme, and your rounding rules for n/2 and √n.
  3. Recompute HMA on a small, manually chosen numeric series and compare to a calculator.

If your result differs, the most useful next question is: Does the calculator use the same WMA weighting scheme and rounding for fractional periods?

You can also examine how changing n affects lag and smoothness, but treat that as a property of the smoothing mechanics—not a standalone indication of future outcomes.

Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.