trend

Weighted Moving Average (WMA)

A moving average with linear weighting — recent bars matter more, in a predictable arithmetic way.

What is it?

The Weighted Moving Average sits between the SMA and the EMA in terms of responsiveness. Like the EMA, it gives more weight to recent prices. Unlike the EMA, the weighting decreases linearly rather than exponentially. For a 10-period WMA, the most recent bar is multiplied by 10, the next by 9, the next by 8, and so on down to the oldest which is multiplied by 1. The sum is divided by the total of all weights (10 + 9 + 8 + ... + 1 = 55 for N=10, or generally N × (N+1) / 2). The mechanical transparency of this weighting is what some traders prefer over the EMA. You can articulate exactly how much each historical bar contributes — there's no exponential decay or recursion. The most recent bar in a 10-period WMA accounts for 10/55 ≈ 18% of the value, the next gets 9/55 ≈ 16%, and so on. The oldest bar gets just 1/55 ≈ 2%. In practice, the EMA and WMA produce very similar curves on most charts. Most traders default to the EMA because it's more widely supported and analyzed. The WMA is favored by some futures scalpers who want recent-price emphasis without the recursive structure of the EMA.

Formula

WMA = (P_N × N + P_{N-1} × (N-1) + ... + P_1 × 1) / (N × (N+1) / 2)

How it's calculated

WMA calculation: 1. Number the lookback bars from oldest (weight 1) to newest (weight N). 2. Multiply each bar's price by its weight. 3. Sum the weighted prices. 4. Divide by the sum of weights, which equals N × (N+1) / 2. Example for 5-period WMA with closes [100, 102, 101, 105, 107]: - Oldest (100) × 1 = 100 - Then 102 × 2 = 204 - Then 101 × 3 = 303 - Then 105 × 4 = 420 - Newest (107) × 5 = 535 - Sum = 1562 - Divide by 1+2+3+4+5 = 15 - WMA = 1562 / 15 = 104.13 Unlike the EMA, the WMA doesn't carry state forward recursively. Each WMA value is calculated fresh from the lookback window. This makes WMA results identical across all platforms regardless of how much historical data is loaded.

When to use it

**When you want EMA-like behavior without the recursion.** Some quantitative traders prefer WMA because the weighting is fully transparent and reproducible. **Short-timeframe trend tracking.** On 5-minute or 15-minute charts, WMA(8) or WMA(13) gives a fast-reacting trend line that's slightly more stable than equivalent EMAs. **Hull Moving Average construction.** The Hull MA (HMA) — a popular noise-reducing trend indicator — is built using WMAs. HMA = WMA(2 × WMA(period/2) − WMA(period), sqrt(period)). This double-weighting reduces lag substantially while preserving smoothness. **Custom moving average blends.** Some advanced traders build composite signals by averaging different MA types: (SMA + EMA + WMA) / 3 to get a consensus trend line. For most uses, the WMA is interchangeable with the EMA. The choice between them is often stylistic rather than performance-driven.

Common parameters

period = 20

Lookback window. Same general behavior as SMA/EMA — shorter = faster.

source = close

Input price. Close is standard.

Pitfalls

**Limited platform support compared to EMA.** Not every charting tool exposes WMA as a first-class option. If you're publishing strategies for other traders to follow, EMA is the safer choice. **Heavy weighting on the newest bar.** Because the most recent bar has the highest weight, a single spike in price (news event, fat-finger trade) moves the WMA more dramatically than an SMA. This can create false signals if your market is illiquid. **Less academic literature.** SMA and EMA have been studied to death in finance research. WMA has less written about it, so optimal periods are less well-established. **Same lag problem at the same period.** Despite the recency-weighting, WMA is still a lagging indicator at the timeframe of its period. Don't expect lead signals.

Pairs well with

SMAEMAHull MAADX

Ready to test a strategy using Weighted Moving Average (WMA)?

Build a strategy →