A weighted moving average multiplies the newest close by n, the one before by n − 1, and so on down to 1, then divides by the sum of the weights. It follows price more closely than an SMA of the same length, which also makes it change direction more often in sideways markets.
What the weighted moving average is
A weighted moving average, or WMA, is an average of the last n closes in which recent closes count more. The weights fall in a straight line: the newest close gets weight n, the oldest in the window gets weight 1, and closes before the window get none. The result is a line that sits closer to recent prices than a simple moving average of the same length.
- Inputs: closing prices.
- Lookback: n sessions; the first value needs n closes.
- Units: dollars, like the prices it averages.
- Cadence: on a daily chart each weight applies to one session.
How to calculate the weighted moving average
Multiply each close in the window by its weight, add the products and divide by the sum of the weights, n(n + 1) / 2. For a 5-session WMA the weights are 1 to 5 and their sum is 15. The first table shows the calculation for session 5 of a hypothetical stock, and the second follows both averages for six sessions.
WMA = (n × Close today + (n − 1) × Close 1 session earlier + … + 1 × Close n − 1 sessions earlier) / (n × (n + 1) / 2)n- the number of sessions in the window
n × (n + 1) / 2- the sum of the weights: 15 for n = 5 and 210 for n = 20
| Session | Close ($) | Weight | Close × weight ($) |
|---|---|---|---|
| 1 | 30.20 | 1 | 30.20 |
| 2 | 30.60 | 2 | 61.20 |
| 3 | 31.10 | 3 | 93.30 |
| 4 | 31.50 | 4 | 126.00 |
| 5 | 31.80 | 5 | 159.00 |
The products add up to $469.70 and the weights to 15, so the 5-session WMA at session 5 is $31.313, against a simple average of $31.040.
| Session | Close ($) | 5-session SMA ($) | 5-session WMA ($) | WMA minus SMA ($) |
|---|---|---|---|---|
| 5 | 31.80 | 31.040 | 31.313 | +0.273 |
| 6 | 31.60 | 31.320 | 31.500 | +0.180 |
| 7 | 31.00 | 31.400 | 31.393 | −0.007 |
| 8 | 30.50 | 31.280 | 31.093 | −0.187 |
| 9 | 30.10 | 31.000 | 30.700 | −0.300 |
| 10 | 29.90 | 30.620 | 30.333 | −0.287 |
The closes peak at session 5. The WMA turns down after session 6, one session before the SMA, which keeps rising until session 7.
How much the WMA lags
On a steady straight-line trend, any average of past prices trails the latest price by a fixed number of sessions. For an n-session SMA the delay is (n − 1) / 2 sessions; linear weights cut it to (n − 1) / 3. An EMA with α = 2 / (n + 1) settles at the same delay as the SMA, though it reaches it through weights that never quite end.
| Period n | SMA | EMA | WMA |
|---|---|---|---|
| 5 | 2.00 | 2.00 | 1.33 |
| 10 | 4.50 | 4.50 | 3.00 |
| 20 | 9.50 | 9.50 | 6.33 |
| 50 | 24.50 | 24.50 | 16.33 |
The WMA trails a steady trend by a third less than the SMA, but it still trails. At a turn, each of these averages keeps moving in the old direction for a while.
How to use the weighted moving average on stock charts
A WMA is read like other moving averages: its slope describes the direction of the recent trend, and the position of price relative to it shows where the latest close stands against that trend. Its faster reaction helps when an SMA of the same length feels too slow, and it is the building block of the Hull moving average.
- Read the slope first. A rising WMA with closes above it describes an advance; a falling one with closes below describes a decline.
- Compare two lengths. A short WMA crossing a long one shows a change in recent direction, with the same lag trade-offs as any crossover.
- Pair it with an SMA of the same length to see how much of a move is recent.
- Keep the period the same when comparing stocks.
Read more in the guides to the Hull moving average and moving averages in chart research.
A stock chart example
The hypothetical chart on this page draws a 20-session WMA and a 20-session SMA over daily candles. After the closing high, the WMA turns down four sessions later and the SMA seven sessions later. In the shaded sideways stretch that follows, the WMA bends with the swings while the SMA stays flatter.
Limitations in sideways markets
The responsiveness that helps in trends works against the WMA in ranges. With no trend to follow, the line turns with each swing and closes cross it often, and many of those crossings reverse within a few sessions. On the hypothetical chart, the WMA changes direction six times in the shaded sideways stretch and the SMA four times.
- Whipsaws. Crossings of price and WMA come and go quickly in a range.
- Still a lagging line. A WMA reacts sooner than an SMA, but only after price has moved.
- Gentle drop-off. The oldest close carries weight 1 out of 210 in a 20-session WMA, so its exit from the window moves the line far less than it would move an SMA.
- No volume. The weights depend only on position in time, not on how many shares traded.
Weighted averages and TradeClever
TradeClever’s Stock Charts do not draw a WMA. They draw up to three SMA overlays and an EMA overlay, so the closest comparison there is an EMA against an SMA of the same period, which shows the same idea of a faster-reacting average. In CleverScan, EMA(close, 20) and SMA(close, 20) are among the supported forms.
Continue with
Sources
- Fidelity Learning Center, Weighted Moving Average (WMA): weighting factors and calculation (checked October 1, 2026)
Read our data and methodology notes for calculation context. This guide explains research tools and observations. It does not recommend a trade or investment.