Concept

WMA

WMA, also known as weighted moving average, is a Trend concept. A reference entry: the Library explains it rather than implements it.

What is a WMA?

A WMA (weighted moving average) is a moving average that assigns linearly increasing weights to more recent bars. Over a lookback of N bars, the newest close is multiplied by N, the previous by N minus 1, down to 1 for the oldest; the weighted sum is then divided by the sum of the weights, N(N+1)/2. Strictly, any unequal weighting produces a weighted average, but on charts "WMA" almost always means this linear version, sitting between the equal-weight SMA and the exponentially weighted EMA in character.

The front-loaded weights make a WMA track price more closely than an SMA of the same length, so it turns earlier at swings at the cost of reacting more to single loud bars. Against a same-length EMA the difference is in the tail rather than the front: a WMA's influence falls linearly and stops dead after N bars, while an EMA's decays exponentially and never fully reaches zero. The WMA also matters as a building block; the Hull Moving Average (HMA) is built entirely from WMAs to cut lag further.

The responsiveness difference is quantifiable: on a steadily trending series a moving average's lag equals the center of mass of its weights, (N-1)/2 bars for an SMA but (N-1)/3 for the linear WMA, roughly two-thirds of the SMA's delay at the same length. The linear form became a standard platform option, sometimes labeled LWMA for linearly weighted, as the simplest scheme that front-loads recency without a decay constant to choose.

Its relatives swap the question the weights answer: a VWMA weights bars by traded volume rather than recency, letting a heavy-volume bar drag the average toward its price regardless of age, while an adaptive-lookback MA changes the effective window with conditions instead of fixing the weights. The plain WMA remains the reference: transparent, cheap, and easy to reason about.

How to calculate a WMA

The calculation is a rolling weighted sum. For a lookback of N bars:

  1. 1Multiply each bar's price (close is the usual source) by its weight: N for the newest bar, N minus 1 for the one before, down to 1 for the oldest.
  2. 2Sum the weighted prices, then divide by the sum of the weights, which equals N(N+1)/2.
  3. 3Roll the window forward one bar and repeat, dropping the oldest price and reweighting the rest.
  4. 4Plot the series. Overlaying an SMA of the same length shows the responsiveness gained, and the extra wiggle paid, for the linear weights.

How it's calculated

A moving average whose weights decrease linearly with age, so the newest price counts most.

WMAn(t)=i=0n1(ni)×PtiW\operatorname{WMA}_n(t) = \frac{\sum_{i=0}^{n-1} (n - i) \times P_{t-i}}{W}
W=n×(n+1)2W = \frac{n \times (n + 1)}{2}
Expanded: WMAn(t)=n×Pt+(n1)×Pt1++1×Ptn+1W\text{Expanded: } \operatorname{WMA}_n(t) = \frac{n \times P_t + (n - 1) \times P_{t-1} + \cdots + 1 \times P_{t-n+1}}{W}
P_t: price of bar t (default close); P_(t-i) is the price i bars back
t: current bar index
i: bar offset, 0 for the current bar
n: lookback length (commonly 9)
W: sum of the weights, n × (n + 1) / 2
WMA_n(t): weighted moving average of length n at bar t

The newest bar carries weight n and the oldest weight 1, so a WMA tracks price more closely than an SMA of the same length.

Distinct from the EMA, whose weights decay exponentially and never reach zero.

The Hull MA is built entirely from WMAs of different lengths.

How traders use it

  • As a trend filter: price holding above a rising WMA keeps a long bias, and the line itself often serves as dynamic support or resistance, though no moving average holds every retest.
  • In crossover systems, where WMA pairs signal earlier than SMA pairs of the same lengths, trading lag for a higher whipsaw rate.
  • As a slope read: the direction and steepness of the WMA act as a simple MA slope filter, gating other signals on trend strength.
  • As a smoothing component inside other tools, from oscillator smoothing to composite averages (the HMA being the best-known WMA construction).
  • In MA ribbon stacks: WMAs of several lengths show trend maturity through the fan's spread and flag transitions when the ribbon compresses and twists.
  • As the smoothing inside regime logic: a trend regime label built on a WMA responds sooner than the SMA version, at the price of more flip-flops in chop.

WMA vs other moving averages

SMA: The SMA weights every bar in the window equally, so it is smoother and slower. The WMA's linear weights shift emphasis to recent bars, turning earlier at swings but reacting more to one-off spikes.

EMA: For the same nominal length both put the same weight, 2/(N+1), on the newest bar. They differ in the tail: EMA weights decay exponentially and never fully vanish, while WMA weights fall linearly and cut off entirely after N bars.

VWMA: Both are weighted averages with different questions behind the weights: the WMA privileges recency, the VWMA participation, heavily traded bars dominating the line.

Ehlers SuperSmoother: The SuperSmoother is a two-pole filter engineered to remove short-cycle noise more cleanly than simple weight shapes manage, typically with less lag for comparable smoothness, at the cost of opacity.

Concept family

Trend

100 concepts mapped · 100 in the Library

WMA FAQ

Turn WMA into a trading strategy.

Describe your WMA idea to Quant. It builds the strategy with you and backtests it on real data.