The Hull Moving Average combines a short and a full-period weighted average, then smooths their difference with another WMA. The result depends on the weighting direction and the integer lengths used. This guide checks those choices on real Forex quotes without treating a responsive line as a tested trading strategy.
1. Follow the three weighted averages
Alan Hull developed HMA in 2005. A WMA over h recent closes reacts differently from a WMA over N closes. Doubling the short average and subtracting the full one produces the intermediate line RAW. A final WMA over r RAW values produces HMA. All four quantities are in price units, but RAW is not the finished HMA.
The subtraction compensates for part of the delay introduced by averaging. It also creates signed effective weights, so HMA can overshoot its input prices. Neither zero lag nor smoothness on every market path is guaranteed. The three averages share the same quotes; they are not three independent confirmations.
2. Calculate the weights and the intermediate line
C[t] is a completed H1 close. WMA(m) uses the latest m retained observations, with weights 1 through m from oldest to newest and denominator m(m+1)/2. Reversing that order produces a different indicator. The main calculation uses h=⌊N/2⌋ and r=⌊√N⌋ for N≥2, with no horizontal shift.
First calculate WMA(h) and WMA(N) at the same candle. Form RAW=2×WMA(h)−WMA(N), then apply WMA(r) to the latest r available RAW values. Do not apply the last WMA directly to price or substitute an EMA at any stage. The numerical table exposes all intermediate values.
WMAₘ(x)[t] = Σⱼ₌₀ᵐ⁻¹ (m−j) × x[t−j] / (m(m+1)/2) h = ⌊N/2⌋ r = ⌊√N⌋ RAW[t] = 2 × WMAₕ(C)[t] − WMAₙ(C)[t] HMA[t] = WMAᵣ(RAW)[t]
3. Read HMA on real Forex candles
The first example shows the candles, both price WMAs, RAW and HMA21. Under the integer-part rule, h=10 and r=4. The selected close satisfies Close>HMA21>WMA(21), with at least one pip between HMA and the full WMA. One pip here is 0.01 JPY per USD.
The picture describes how these filters respond to the same price history. A line lying closer to the latest price does not establish a better entry. A separate trading test would need execution, risk, exit and transaction-cost rules.
From two price WMAs through RAW to HMA

Interval end · UTC: 2024-01-04T14:00:00Z · Close: 144.520
| Rounding rule | h | r | WMA(h) | WMA(N) | RAW | HMA21 |
|---|---|---|---|---|---|---|
| Integer parts | 10 | 4 | 144.047455 | 143.752857 | 144.342052 | 144.177877 |
| Nearest integer · halves up | 11 | 5 | 144.011515 | 143.752857 | 144.270173 | 144.066782 |
4. Compare the rounding rules
Hull’s published formula uses Integer() notation. This guide explicitly interprets it as taking the integer part of each positive length. StockCharts documents a nearest-integer convention; our comparison rounds exact halves upward. For N=21 the lengths are h=10,r=4 versus h=11,r=5. For N=55 they are 27,7 versus 28,7. For N=20 both give 10,4.
The second example holds N=21, price input and selected candle fixed. Only the rounding rule changes. The final lines differ by at least five pips in this example; that threshold selected an illustration, not a profitable trade. Changing the short or final window can also change a line’s slope and its first available timestamp.
Same candles and period, different rounding

Interval end · UTC: 2024-01-10T16:00:00Z · Close: 145.600
| Rounding rule | h | r | WMA(h) | WMA(N) | RAW | HMA21 |
|---|---|---|---|---|---|---|
| Integer parts | 10 | 4 | 145.236545 | 145.031645 | 145.441446 | 145.327026 |
| Nearest integer · halves up | 11 | 5 | 145.213939 | 145.031645 | 145.396234 | 145.261778 |
5. Separate a line turn from a price cross
Let ΔHMA[t]=HMA[t]−HMA[t−1]. A fresh upward turn means ΔHMA[t]>0 and ΔHMA[t−1]≤0; a downward turn uses ΔHMA[t]<0 and ΔHMA[t−1]≥0. These labels require three complete, adjacent hours and three available HMA values. Simply continuing to rise is not another upward turn.
The third example has an upward HMA21 turn while the closing price is still below HMA. A fresh upward price cross instead requires C[t−1]≤HMA[t−1] and C[t]>HMA[t], using two complete adjacent hours. A positive slope, a turn and a price cross must therefore be read separately. None is an automatic order.
An upward HMA turn with price still below

Interval end · UTC: 2024-05-08T21:00:00Z · Close: 155.620
| Rounding rule | h | r | WMA(h) | WMA(N) | RAW | HMA21 |
|---|---|---|---|---|---|---|
| Integer parts | 10 | 4 | 155.555818 | 155.457922 | 155.653714 | 155.646390 |
| Nearest integer · halves up | 11 | 5 | 155.550000 | 155.457922 | 155.642078 | 155.632222 |
6. Check availability and the actual input window
The full WMA first exists on recorded bar N. The final stage needs r RAW observations, so the first HMA is on bar N+r−1. For N=21 this is bar 24 with integer parts and bar 25 with nearest rounding. HMA20 begins on bar 23 and HMA55 on bar 61 under both rules. Before HMA exists, one or both price WMAs and RAW may already be available. Missing results are not zeros.
Unlike the recursive EMA stages in DEMA and TEMA, this HMA uses a finite input window. Earlier prices outside that complete window do not affect the mathematical result. Every retained close, including a partial hour, counts once; gaps are not filled or reset. Recorded H1 bars need not be consecutive clock hours. When comparing an MT4 or another platform’s HMA, check price input, weights, rounding, available bars and shift.
7. Explore the candles and calculation
Choose period 20, 21 or 55, a rounding rule and the visible lines. These are fixed illustrations, not profit-optimized settings. The chart ends at the selected candle and the table compares periods at that same timestamp. Example buttons restore N=21, integer parts and the comparison view. The first-value button deliberately visits early history.
All three main examples require a complete, consecutive 64-hour display window. Selection is chronological: the first eligible Close>HMA>WMA(N) configuration with at least a one-pip gap; the first eligible rounding difference of at least five pips starting 64 recorded bars after the first example; and the first upward turn with Close<HMA. No trades are ranked by their later outcome.
Loading historical candles…
Insufficient retained candles for the selected HMA. Earlier components may already be available.
- Interval end · UTC
- —
- OHLC · JPY per USD
- —
- Close
- —
- Short WMA length · h
- —
- Final WMA length · r
- —
- Required retained bars
- —
- WMA(h)
- —
- WMA(N)
- —
- RAW = 2 × WMA(h) − WMA(N)
- —
- HMA
- —
- Integer HMA minus nearest HMA · pip
- —
- HMA change · pip
- —
- Observed minute bars
- —
- Hour completeness
- —
- Gap before this hour
- —
- Recorded bars from history start
- —
- Gaps inside the input window
- —
- Partial hours in the input window
- —
- Fresh price cross
- —
- Fresh HMA turn
- —
Same candle · periods 20 / 21 / 55
| Period · recorded bars | h | r | WMA(h) | WMA(N) | RAW | HMA | Close − HMA · pip |
|---|
Frequently asked questions
Is HMA the same as a normal WMA?
No. It combines two price WMAs into RAW, then smooths RAW with a third WMA. A single WMA(N) is a different calculation.
Why can two HMA lines differ at the same period?
Check the half and square-root rounding, weight direction, price source, available input window, gaps and horizontal shift. The same name and N are not enough.
When does the first HMA become available?
With complete retained windows it is on recorded bar N+r−1. HMA21 starts on bar 24 under integer parts and bar 25 under the nearest convention used here.
Does an upward HMA turn mean price has crossed above it?
No. The real example shows an upward turn with the close still below HMA. Slope and price position are separate observations.
Does HMA eliminate delay or guarantee profitable signals?
No. It can overshoot, change direction and be crossed repeatedly. Profitability requires separate testing of a fully specified strategy with costs.
Are the candles real, and is this a backtest?
The guide reuses retained historical Forexite USD/JPY quotes. It verifies indicator calculations; it does not simulate orders, fills or trading returns.
Data, calculation choices and scope
The guide reuses the verified 375,702 USD/JPY minute observations from Forexite’s 2024 Trade/MetaStock archives used for DEMA and TEMA. Fixed GMT+1 labels are shifted back one hour to UTC. Minute labels are treated as interval ends, with H1 buckets (start,end]. These are declared reconstruction assumptions.
The 6,265 retained H1 intervals end from 2024-01-01 23:00 UTC through 2024-12-31 23:00 UTC: 6,178 complete hours, 87 partial hours and 52 gaps before recorded hours. Lines break at gaps. Cross and turn labels have their own adjacent-hour checks; the panel also reports gaps and partial hours within the selected HMA input window. Quotes do not supply a complete bid/ask execution path or guarantee agreement with a broker’s candles.
The CSV contains hourly candles and both rounding conventions for all three periods. The method ZIP includes retained minute inputs, the original archive URL/checksum list, calculation code and verification results. Hourly reconstruction and WMA calculations are independently checked; the original 366 daily ZIPs were not downloaded and parsed again for this release.
