Skip to content
Menu

Weighted Moving Average (WMA)

By Chad Smith, Director of Research & Analysis · Updated

On this page
  1. What it measures
  2. The formula
  3. Default settings
  4. How to read it
  5. WMA vs SMA vs EMA
  6. Common strategies
  7. Weaknesses
  8. Indicators it pairs with
SMA 20WMA 20
Illustration, not real price data

The weighted moving average (WMA) is a moving average in which each price is multiplied by a weight that rises in equal steps from the oldest bar to the newest. The latest close counts the most, the oldest counts the least, and the line reacts faster than a simple moving average of the same length. It is sometimes called the linear weighted moving average (LWMA), which is the name MetaTrader uses.

What it measures

The WMA measures the average price over a fixed window, tilted toward recent activity. It assumes that the latest prices tell you more about the current state of the market than prices from the start of the window.

Its slope shows the direction of the trend, just like other averages. What sets it apart is the shape of the weighting: a straight line. In a 5-period WMA the newest price is worth five times as much as the oldest. In a 20-period WMA it is worth twenty times as much.

The formula

WMA = (N × P1 + (N − 1) × P2 + ... + 2 × P(N−1) + 1 × PN) / (N + (N − 1) + ... + 1)

The denominator is the sum of the weights:
Sum of weights = N × (N + 1) / 2

where
  P1 = the most recent closing price (weight N)
  PN = the oldest closing price in the window (weight 1)
  N  = the number of periods

Worked example (illustrative numbers). Take a 5-period WMA with closes, oldest to newest, of 10, 11, 12, 11 and 13. The weights are 1, 2, 3, 4 and 5. The weighted sum is (1 × 10) + (2 × 11) + (3 × 12) + (4 × 11) + (5 × 13) = 10 + 22 + 36 + 44 + 65 = 177. The sum of weights is 5 × 6 / 2 = 15. The WMA is 177 / 15 = 11.8. A 5-period SMA on the same prices is 11.4, so the WMA sits closer to the latest close of 13.

Default settings

There is no universal default; most platforms open the WMA at a short period, often 9, 10 or 20, applied to the close. Traders typically choose lengths in line with other averages:

PeriodTypical use
9 to 20Short-term direction and entry timing
50Intermediate trend
100 to 200Long-term trend, less common than the SMA at these lengths

The WMA is built into TradingView and MetaTrader, where MetaTrader lists it as "Linear Weighted" in the moving average settings.

How to read it

The WMA is read the same way as other averages, but with the expectation of earlier turns. When price is above a rising WMA, buyers have been in control over the window. When price is below a falling WMA, sellers have.

Because the oldest price carries the smallest weight, the drop-off jumps that affect the SMA are reduced. A spike leaving a WMA window has only a weight of 1, so its exit barely moves the line. A spike entering the window, however, carries the full weight of N and can move it sharply.

That asymmetry means the WMA responds strongly to fresh moves and mildly to old ones. It shows what is happening now more than what happened at the start of the period.

WMA vs SMA vs EMA

All three averages share a purpose, but the weighting changes how they behave.

  • SMA: flat weights. The slowest of the three. Large drop-off effect.
  • WMA: straight-line weights inside a hard window. Faster than the SMA. Small drop-off effect because old prices carry little weight before they exit.
  • EMA: weights that shrink by a constant ratio and never reach zero. Usually close to the WMA in speed. No hard window and no drop-off at all.

For the same period, a WMA and an EMA often look similar on a chart. The WMA gives slightly more weight to the most recent few bars and forgets old prices completely after N bars, while the EMA keeps a faint memory of them.

The Hull moving average is built from WMAs. It takes a fast WMA, a slow WMA and a final WMA smoothing step to reduce lag even more.

Common strategies

Fast trend line

Traders who find the SMA too slow but the EMA's long memory unhelpful use a WMA as their main trend line. A rising WMA with price above it supports long trades.

WMA crossovers

A short WMA crossing a longer WMA is used in the same way as other crossovers. Signals appear earlier than SMA crosses, with more false signals in sideways conditions.

Price and WMA closes

Some traders wait for a full candle to close beyond the WMA before acting. This filters out intrabar spikes that briefly cross the line and reverse.

Mixed averages

Combining a WMA with a slower SMA gives a fast-versus-steady pairing. The WMA shows the immediate push, and the SMA defines the backdrop.

Weaknesses

The WMA still lags. Weighting recent prices more reduces delay but does not remove it.

It is noisier than the SMA. A single strong bar enters with the highest weight, so short-term spikes can bend the line and trigger signals that soon reverse.

It is less widely followed. The SMA and EMA are the standard reference lines in market commentary, so the WMA rarely acts as a widely watched support or resistance level.

As with all averages, it ignores volatility and volume and gives no warning before a trend begins.

Indicators it pairs with

  • Hull moving average, the WMA-based refinement designed to cut lag.
  • ADX or Aroon, to confirm a trend is present before following WMA signals.
  • RSI, to check whether momentum supports the WMA's direction.
  • ATR, to set stops at a distance that reflects current volatility.
  • MACD, for a separate view of the gap between fast and slow averages.

To see how the different averages compare in practice, work through the technical analysis course.

Brokers with strong charting to practice on

Put this into practice on a demo account first, with no money at risk.

Frequently asked questions

What is a weighted moving average?

It is an average in which the newest price gets the largest weight and each older price gets one step less. The weights decline in a straight line across the window.

How is the WMA different from the EMA?

Both favor recent prices. The WMA uses straight-line weights inside a fixed window and drops old prices completely, while the EMA uses weights that shrink gradually and never fully disappear.

Is the WMA faster than the SMA?

Yes. Because recent prices carry more weight, the WMA turns sooner than a simple average of the same length.

Where is the WMA used besides as a standalone line?

It is the core ingredient of the Hull moving average, which combines several weighted averages to reduce lag further.

What period should I use for a WMA?

Traders use the same kinds of lengths as with other averages, such as short periods for timing and longer periods for the main trend. There is no single correct choice.