In simple terms
SMA gives equal weight to a recent window. Linear WMA gives more weight to newer observations. EMA carries earlier information through a recursive state. Hull combines weighted averages with subtraction and another smoothing stage, so it can move outside the range of its input prices. Compare the construction before interpreting the line.
On this page
Separate the average type from the period
SMA, EMA, WMA and Hull Moving Average (HMA) transform current and earlier prices in different ways. A shared period of 16 does not give them identical weights, memory or response. We use trailing calculations with no display offset. Their values are price levels, not returns or probabilities. The comparison table describes the stated formulas; it does not rank the four types by profitability.
| Average | Weighting rule | History used |
|---|---|---|
| SMA16 | Equal weights in the latest window | Latest 16 closes |
| EMA16 | Recursive update with a disclosed mean seed | Current close and earlier recursive state |
| WMA16 | Linear age weights, newest close heaviest | Latest 16 closes |
| HMA16 | Two price WMAs, subtraction, then another WMA | 19-close finite support for HMA16 here |
Fix the price input and candle status first
Our market example uses Binance Spot XRPUSDT and native H4 closing prices, quoted in USDT per XRP. Every displayed reading belongs to a completed candle. Changing to highs, typical prices, a derivatives market or another interval changes the inputs. On H4, a period counts chart candles rather than days. Keep the input series and its timestamps fixed when comparing the four constructions.
Give each close the same weight in SMA
SMA16 adds the latest 16 closes and divides by 16. When a new close arrives, the oldest one leaves the window. Each included close has equal weight; changing which observation is old or new does not change its weight while it remains included. The small weight illustration uses four observations so the contrast with linear WMA is easy to inspect. Its short length is for arithmetic, not a trading recommendation.
SMA16_t = sum(C_(t-j), j=0..15) / 16Equal SMA weights and linear WMA weights
Constructed arithmeticDisclose the EMA seed and recursive update
Our EMA16 starts with the arithmetic mean of the first 16 consecutive valid closes. Later updates give the new close weight 2/17 and the previous EMA weight 15/17. Earlier inputs therefore retain declining influence through that previous value. An EMA16 is not simply a weighted window containing only the latest 16 closes. Other initialization choices or available history can produce different readings. The first valid value is not a guarantee that initialization effects have disappeared.
EMA16_seed = mean(first 16 consecutive valid closes)EMA16_t = EMA16_(t-1) + (2/17) * (C_t - EMA16_(t-1))Assign the largest linear WMA weight to the newest close
Here WMA means linearly weighted by age, not weighted by trading volume. For WMA16 the oldest close has multiplier 1 and the newest has multiplier 16; divide the weighted sum by the sum of those multipliers, 136. The four-observation example uses prices 10, 20, 30, 40: SMA4 is 25, while WMA4 is 30. Reverse the weight order and you have changed the calculation rather than reproduced it.
WMA_n,t = sum(k * C_(t-n+k), k=1..n) / (n*(n+1)/2)Build Hull from three explicitly defined WMAs
For HMA16, calculate WMA8 and WMA16 from the same closes. Form the intermediate series as twice WMA8 minus WMA16, then apply WMA4 to that series. Half of 16 is 8 and its square root is 4, so neither derived length needs rounding here. The subtraction is essential. Replacing a stage with SMA or EMA, using a different derived length, or omitting the last smoothing stage creates another calculation.
Raw16_t = 2 * WMA8(C)_t - WMA16(C)_tHMA16_t = WMA4(Raw16)_tHMA16: two price averages, subtraction and final smoothing
Constructed arithmeticUse a short sequence to check the arithmetic
For the constructed closes 10, 20, 30, 40, 50, use period 4 solely to keep the table short. At observation 4, SMA4 and the EMA4 seed are 25, WMA4 is 30, and HMA4 is still unavailable. At observation 5, SMA4 and EMA4 are 35, WMA4 is 40, and HMA4 is 50. HMA4 uses a half-length of 2 and a final smoothing length of 2. Its equality with the last price on this special rising sequence does not establish zero delay on other paths.
| Observation | Closing price | SMA4 | EMA4 | WMA4 | HMA4 |
|---|---|---|---|---|---|
| 1 | 10 | N/A | N/A | N/A | N/A |
| 2 | 20 | N/A | N/A | N/A | N/A |
| 3 | 30 | N/A | N/A | N/A | N/A |
| 4 | 40 | 25.00 | 25.00 | 30.00 | N/A |
| 5 | 50 | 35.00 | 35.00 | 40.00 | 50.00 |
Arbitrary price units. Initial values marked N/A are unavailable, not zero. HMA4's last value of 50 is specific to this short sequence.
Count the history required by each construction
With complete consecutive windows, SMA16 and WMA16 first become valid at close 16. Our mean-seeded EMA16 also first becomes valid there. HMA16 needs four valid intermediate observations, so its first value appears at close 19. Its finite support spans 19 closes, although its nominal period is 16. EMA keeps earlier recursive information instead of having that finite cutoff. Matching the period alone does not match the information being averaged.
| Average | Consecutive closes needed |
|---|---|
| SMA16 | 16 |
| EMA16 | 16 |
| WMA16 | 16 |
| HMA16 | 19 |
These counts identify the first valid readings; they are not convergence guarantees or universal platform initialization requirements.
Inspect a constructed change before drawing market conclusions
The step example holds 32 closes at 100 and then 24 closes at 110, in arbitrary price units. All four calculations use period 16 and the stated initialization. HMA16 reaches about 112.51 on the eighth close at the new level, above every price in this constructed series. The other three calculations remain within the range of the inputs they retain. This is a reproducible response to a defined step, not a market forecast or a profitable trade.
A constructed step can make Hull overshoot
Constructed arithmeticExplain Hull overshoot through its effective weights
The nested HMA16 formula can be expanded into 19 effective coefficients, from the newest close to the oldest. They sum to 1, but some are negative because of the subtraction. HMA is therefore not a convex average and can exceed the range of its inputs. SMA and linear WMA use positive window weights. A mean-seeded EMA with the stated update stays within the range of its retained history, which can extend beyond the latest 16 closes. Do not clamp a valid HMA reading to a recent high or low.
HMA16 has positive and negative effective weights
Constructed arithmetic- Sum of coefficients
- 1
- Negative coefficients
- 11
Select the historical window independently of the curves
The actual illustration uses the first complete Monday-to-Sunday UTC week of 2024: 42 XRPUSDT H4 candles opening from 1 January 00:00 up to, but excluding, 8 January 00:00 UTC. The window is selected by calendar, not by which line looks best or by a trade result. EMA is calculated from the retained history beginning in June 2019, with resets at missing scheduled candles. The existing XRP HMA55 strategy and its results are separate from this period-16 teaching comparison.
Read all panels at the same completed candle
Select a candle to inspect its actual OHLC prices and the four moving averages. The price panel shows real candles, the next panel shows the four averages, and the last shows the close minus each average. All share the selected opening timestamp, while each panel has its own vertical scale. Colors and line styles identify the same calculation across panels. Display rounding is for reading; the calculations retain their unrounded values.
XRP H4: price, four averages and price distances
Actual historical candles- Open
- 0.615500
- High
- 0.619000
- Low
- 0.611200
- Close
- 0.613000
- SMA16
- 0.621625
- EMA16
- 0.621750
- WMA16
- 0.620570
- HMA16
- 0.619143
- Close minus SMA16
- −0.008625
- Close minus EMA16
- −0.008750
- Close minus WMA16
- −0.007570
- Close minus HMA16
- −0.006143
Keep a price distance separate from a trading result
Close minus SMA, EMA, WMA or HMA is a signed price distance in USDT per XRP. A positive value means that the close is above that particular average; a negative value means it is below. It is not an account return, a profit bar or a prediction of the next candle. Price above an average, the slope of an average and a crossing between two averages are different observations. None supplies a complete execution or risk rule by itself.
Attach final readings to the scheduled close
The actual candle opening 1 January at 12:00 UTC completes at 16:00 UTC. Its final close and the four final averages become available at that scheduled close, not at the opening label. While the candle forms, provisional values can change. The last displayed candle opens 7 January at 20:00 and completes 8 January at 00:00 UTC. A line drawn between completed observations does not reveal every intrabar movement, and shifting it on the chart does not make the information available earlier.
Final values become available after the candle opens
Actual historical candlesMatch missing-bar, rounding and display conventions
Record the source price, market, interval, period, EMA seed, WMA weight direction and Hull derived lengths before diagnosing a platform mismatch. Our example resets every window and the EMA seed after a missing scheduled H4 candle; it does not invent replacement bars. Every WMA stage needs a full valid window. For periods whose half or square root is not an integer, declare a rounding convention. Keep rounding for display and use zero display offset when reproducing this guide.
Reproduce the measurements before choosing a trading rule
The downloads preserve the selected raw candles, preceding context, EMA continuation state, formulas, source rows and archive checksums. The small checker validates the continuation; the original XRP evidence additionally permits a full-history replay. These checks establish the disclosed measurements. Choosing entries, exits, execution, position size and costs would require a separate strategy protocol and evaluation. A more responsive line alone does not establish a better strategy.
Frequently asked questions
Is EMA always faster than SMA at every turning point?
Their weighting and memory differ, but that does not guarantee the order of every turn on every price path. Compare the stated formulas and the actual sequence rather than treating one example as a universal ranking.
Does WMA in this guide use volume?
No. It assigns linearly increasing weights by recency, with the newest close receiving the largest weight. A volume-weighted average uses another input and is a different calculation.
Is a Hull value outside recent prices necessarily an error?
No. Hull's effective coefficients can be negative, so overshoot is possible. Check the source, lengths, rounding and initialization before deciding whether a particular reading is wrong.
Do all period-16 averages use only 16 closes?
No. SMA16 and WMA16 use a 16-close window, HMA16 here has 19-close finite support, and the stated EMA16 retains earlier recursive information. The period label does not describe their entire memory.
Why can two platforms show different averages?
They may use different price inputs, seeds, retained history, missing-bar policies, Hull integer conventions or display offsets. Match those details and compare unrounded readings from completed candles.
Can this comparison prove which average is most profitable?
No. It compares price transformations, not trading systems. The charts contain no trade ledger, execution costs or account-equity curve. Profitability requires a separately defined and evaluated strategy.
Primary sources
Copying or republication without attribution and an active link to the original material is prohibited. Usage policy.