Concept

WMA

WMA is a Trend concept. The Library holds 6 implementations, each one a working definition you can pull into Quant.

Top WMA indicators

6 total

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 HMA is constructed entirely from WMAs to cut lag further.

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 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 trend-strength gate for other signals.
  • As a smoothing component inside other tools, from oscillator smoothing to composite averages (the HMA being the best-known WMA construction).

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.

HMA: The HMA is built from WMAs: it de-lags one WMA with another and smooths the result over the square root of the length. It is faster and smoother than a raw WMA but can overshoot at turns.

More WMA implementations

Related concepts · Moving-average lineage

Concept family

Trend

100 concepts mapped · 88 in the Library

WMA FAQ

Is a WMA faster than an SMA?

At the same length, yes in the sense of lag: the linear weights let it respond to recent price shifts sooner than the equal-weighted SMA. That responsiveness is not free. The WMA also reacts more to isolated spikes, so crossover and slope signals arrive earlier but fail more often in choppy conditions.

What is the difference between a WMA and an EMA?

Both emphasize recent price, and at equal lengths they put the same weight on the newest bar. They differ in the tail: WMA weights decline linearly to zero at the end of the window, while EMA weights decay exponentially and never fully disappear. In practice the two track each other closely, and the length choice usually matters more than the weighting scheme.

What length should a WMA be?

There is no universally best length. The conventions used for other moving averages apply: shorter lookbacks (roughly 9 to 21 bars) for timing, longer ones (50 and up) for trend and regime context. Because the WMA is front-loaded, a given length behaves like a shorter SMA in lag terms, and whatever you pick should be tested on the market and timeframe you actually trade.

Build WMA your way.

Quant writes, tests, and refines it with you — then it runs on LuxAlgo charting or ports to TradingView.