What Is a Weighted Moving Average (WMA)? The Newest Price Counts Most, So How Does It Differ from EMA?
“SMA is too slow. Would WMA be better?”
WMA is faster than SMA, but the way it gets there is often misunderstood. WMA counts newer prices more times; its difference from EMA lies not in today’s weight but in when old data leaves. A 20-period WMA and a 20-period EMA give today’s candle exactly the same weight: 9.52%. This article first works it out once with a table, then uses a real chart marked 1 to 4 to show where WMA is faster and what it pays for that.
This article is part of MASQuant’s “Trading Academy · Technical Indicators” series. All the indicators are sorted by category in Technical Indicators: The Complete Guide.
In one sentence
WMA = an average in which newer prices count more times.
In a 20-period WMA, today counts 20 times, yesterday 19 times, and so on down to the oldest bar, which counts once. Anything older does not count at all.
WMA is like a teacher working out a term grade: the latest test counts 5 times, the one before 4 times, and the earliest just once. Recent results matter most, but early results still count a little. SMA, by contrast, counts every test once, old or new. So WMA stays closer to recent prices, and it is also more easily pulled around by the last few candles.
Work it out once: a 5-bar WMA
Here is how a 5-period WMA is calculated (the following are round numbers for illustration, not market data):
| Bar | Close | Times counted | Close × times |
|---|---|---|---|
| Oldest | 100 | 1 | 100 |
| Bar 2 | 102 | 2 | 204 |
| Bar 3 | 104 | 3 | 312 |
| Bar 4 | 106 | 4 | 424 |
| Today | 108 | 5 | 540 |
| Total | 15 | 1,580 |
WMA = 1,580 ÷ 15 = 105.33. The same five prices give an SMA of 104. With today’s close at 108, SMA is 4 behind and WMA only 2.67 behind. That is why WMA is faster: the centre of the average has moved towards the new end.
Now look at how much weight each average gives each candle at 20 periods:
| Position of the candle | SMA | WMA | EMA |
|---|---|---|---|
| Today | 5.00% | 9.52% | 9.52% |
| 1 bar ago | 5.00% | 9.05% | 8.62% |
| 10 bars ago | 5.00% | 4.76% | 3.50% |
| 19 bars ago (the 20th bar) | 5.00% | 0.48% | 1.42% |
| All older bars combined | 0 | 0 | 13.5% |
This table shows two things. First, today’s weight is exactly the same for WMA and EMA. Second, the difference is in the tail: WMA forgets everything after 20 bars, while EMA always keeps a little, and its older data still adds up to 13.5%.
The formula
WMA(n) = (today × n + yesterday × (n − 1) + … + the bar n − 1 ago × 1) ÷ (1 + 2 + … + n)
Denominator = n × (n + 1) ÷ 2
For 20 periods: 20 × 21 ÷ 2 = 210
The weights fall one step at a time, so it is also called the Linear Weighted Moving Average (LWMA). The “weighting” is by how recent a price is and has nothing to do with volume; the average weighted by volume is VWAP (see What Is VWAP?).
This line is built into MT5: open the Moving Average indicator and set Method to Linear Weighted.
Read the chart: Germany 40 in 2024–2025, following 1 to 4
The chart below shows the Germany 40 index (GER40) daily from late August 2024 to early April 2025, taken from MT5 historical prices. It moves through a range, a rally and a sharp fall: from 28 August to 19 November 2024, closes moved between 18,262 and 19,645, ending just 1.6% from where they started; from 20 November 2024 to 4 March 2025, the index rose from 19,091 to 22,772, up 19.3%; it then set its highest close of 23,350 on 18 March before falling to 19,636 on 8 April.

In the range, WMA gets crossed the most (3 October 2024). Over the 38 candles from 27 September to 19 November, closes crossed SMA 5 times, EMA 7 times and WMA 11 times. On 3 October the close crossed WMA, while SMA was not crossed at the time. The closer a line sits to price, the more easily it gets crossed back and forth.
The high: close of 23,350 on 18 March 2025. That day WMA was at 22,864 and SMA at 22,735, so WMA was nearer to price. During the rally, the average distance between the close and the line was 1.78% for WMA, 2.17% for EMA and 2.44% for SMA. In this stretch WMA sat even closer than EMA, which comes from the tail in the weight table above: old data leaves more cleanly.
WMA starts falling (26 March 2025, 6 bars after the high). EMA turned on the same day. With the same weight for today, the two lines turn at nearly the same time, and here they cannot be told apart. The close that day was 22,717, already 2.7% below the high.
SMA starts falling (28 March 2025, 8 bars after the high). That is 2 bars later than WMA, with a close of 22,481, 3.7% below the high. Those 2 bars are what WMA buys, and the price is the 6 extra crossings in 1.
This is a real stretch of historical prices, used to show how WMA behaves. It is not a general rule. Change the instrument, the timeframe or the period, and every number will change.
What you see, what it means
| What you see | What it usually means | But be careful |
|---|---|---|
| WMA rising, close above the line | Recent prices are strong | It only describes now; WMA is pulled around by the last few candles |
| WMA turns before SMA | Recent prices have weakened | It turns often in a range too, so it does not have to be the end of a trend |
| Close crosses WMA | The short-term centre has shifted | In a range it crosses constantly (11 times in the stretch at 1) |
| The gap between WMA and SMA widens | This move is going fast | A wide gap does not mean a reversal; it can last a long time in a trend |
How to use it: three examples
Example 1: as a trend filter
The rule can be written as: “Only consider going long when WMA 20 is rising and the close is above WMA 20.” Compared with the SMA version, it enters a few bars earlier, exits a few bars earlier, and gives a few more false signals.
Example 2: a short WMA with a long average
Using WMA 10 as the fast line and SMA 50 as the slow line is somewhat steadier than using WMA for both: the fast line reacts, and the slow line sets the direction.
Example 3: as a component of other indicators
WMA has a clean tail, so it is often used to build other indicators. The Hull Moving Average (HMA) is calculated from three WMAs (see What Is the Hull Moving Average (HMA)?).
All three examples have to accept the same thing: the faster the line, the more false signals. Switching to a faster line just swaps the problem from “too slow” to “too noisy”.
Common mistakes
1. Assuming WMA must be much faster than EMA
At the same period, WMA and EMA give today the same weight. On the chart the two lines turned on the same day. The main difference is in old data, not the newest candle.
2. Thinking a faster line gives more accurate signals
In the stretch at 1, closes crossed WMA 11 times and SMA 5 times. In a range, a fast line only makes you trade more.
3. Treating WMA as an average that looks at volume
The “weighting” in WMA is by time, and volume is nowhere in the formula. For an average that combines price and volume, look at VWAP.
FAQ
What is WMA?
WMA (weighted moving average) is an average that gives newer prices more weight. In an n-period WMA, today counts n times, yesterday n − 1 times and the oldest bar once, and the total is divided by the sum of those counts.
How does WMA differ from EMA?
At the same period, today’s weight is the same. The difference is in old data: WMA drops it completely after the period, while EMA’s weight shrinks but never reaches zero.
How does WMA differ from SMA?
SMA gives every candle the same weight, while WMA gives newer candles more. So WMA stays closer to price and turns earlier, but gets crossed more easily.
How do I open WMA in MT5?
Insert the Moving Average indicator, set Method to Linear Weighted and enter your period. There is no separate indicator called WMA; it is one of the calculation methods of the Moving Average.
Conclusion
WMA is an average that moves its centre towards new data. It turns earlier than SMA, but it is also crossed the most in a range. It gives today the same weight as EMA; the difference is in the tail of old data.
So the real question is: once you switch your rules from SMA to WMA, does exiting earlier pay for the extra false signals in ranges? One stretch of historical prices cannot answer that; you have to backtest the rule over many stretches of the market.
Don’t have rules of your own yet, and don’t want to piece them together one indicator at a time? With MASQuant’s Strategy Genie, you just choose an investment style first; the AI analyses market conditions, selects instruments and gives you three candidate strategies at once. Each one has already been backtested on historical data, with its returns and maximum drawdown laid out in the open, and then you decide whether to deploy it to MT5.
If you already have an idea of your own, write the condition as one sentence, for example “only go long when WMA 20 is rising and the close is above WMA 20”, give it to the AI Strategy Assistant, and press go to start the backtest. The backtest environment includes real market frictions such as spreads, slippage, changes in market liquidity and execution delays (see the AI Strategy Assistant guide for how to use it). Then switch WMA back to SMA and run it again, and you will see the difference. A backtest tells you “how this rule performed in past market conditions”, not a guarantee about the future.
An idea only becomes a strategy once it’s been tested.
Not sure which strategy to use?
New here? Start with this 10-minute beginner’s guide. It walks you through picking your investment style, letting MASQuant’s Strategy Genie use AI to generate and backtest candidate strategies, and running one on an MT5 demo account, step by step.
Read the 10-Minute Beginner’s Guide →Ready already? Sign in with Google to start for free. No credit card needed for your 15-day free trial.
All strategies and backtests are for reference only and do not constitute investment advice.
The price chart in this article is taken from historical prices on the MT5 platform (daily; quotes and daily candle cut-off times differ slightly between platforms, so values may not match exactly), and the indicators are calculated by a program using the standard formulas; the round numbers in the example are not market data. Historical prices are used only to show how the indicator behaves and do not represent future price movements.
Risk disclosure: CFDs are high-risk financial products and can lead to rapid loss of capital. Past performance does not guarantee future results. All strategies and backtests are for reference only and do not constitute investment advice. Please read our Risk Disclosure carefully before trading.
Further reading:
- What Is a Simple Moving Average (SMA)? Why Moving Averages Are Always a Step Behind
- What Is an EMA? The Exponential Moving Average Is Faster, but What Does That Cost?
- What Is the Hull Moving Average (HMA)? Almost No Lag, at the Cost of Overshooting
- Technical Indicators: The Complete Guide to 49 Common Indicators, Sorted by What They Measure


