Charts See the terminal

Weighted Moving Average (WMA)

An average that weights the newest bar most and each older bar a step less, so it turns sooner than a simple average of the same length.

Moving Average Add to chart

Live WMA preview · BTC/USDT · Binance

What is WMA?

A weighted moving average draws one line through price, like a simple average, but gives the newest bar the largest weight and each older bar one step less, down to a weight of 1 for the oldest bar in the window. That makes it follow price more closely than a simple average of the same length, while still ignoring everything outside its window.

WMA smooths price to help identify trend direction. It does not confirm trend strength, it does not remove lag, and it does not predict future prices.

How to use WMA

  • Price above or below the line. Price holding above the WMA is read as context for an uptrend, below it for a downtrend.
  • The slope. A rising line means recent bars, which carry the most weight, are above the older ones. A flattening line usually means the move has stalled.
  • A fast and a slow WMA crossing. When a shorter WMA crosses a longer one, recent prices have overtaken the longer window.
  • Period length. Shorter reacts sooner and signals more often; longer is smoother and later.

These are ways to read the line, not entry signals on their own.

Settings

SettingDefaultWhat it changes
Length9 Bars in the average, and the weight given to the newest bar. Lower turns sooner and whipsaws more; higher is smoother and later. Minimum 1.
SourceClose Which price each bar contributes. Open, high, low and the averaged sources such as hl2 and hlc3 are also available.

Adjust the period and price source in the indicator settings.

Calculation

Each bar in the window is multiplied by a weight that falls by one per bar, from the length at the newest bar to 1 at the oldest. The total is divided by the sum of the weights:

WMA = (n * price[0] + (n - 1) * price[1] + ... + 1 * price[n - 1]) / (n * (n + 1) / 2)

With the default length of 9:
WMA = (9 * price[0] + 8 * price[1] + ... + 1 * price[8]) / 45

At the default length the newest bar carries 9/45, a fifth of the result, and the oldest carries 1/45. A simple average of the same length gives every bar 1/9. The weights stop at the edge of the window, so, unlike an exponential average, a bar has no influence at all once it is more than n bars old.

The first value appears once a full window is available, on the ninth bar with the default length.

Limitations

  • It still lags. Heavier weights on recent bars reduce the delay compared with a simple average but do not remove it.
  • Sideways markets produce repeated false crossovers. With no trend to follow, price crosses the line again and again.
  • The live candle moves. The current bar carries the largest weight, so its value swings the most until that bar closes.
  • It depends on timeframe, period and source. The same indicator gives a different line on 15m than on 1D, or on close against hl2.
  • It is not a strategy. On its own it carries no risk management, sizing or exit.

Frequently asked questions

A weighted moving average is an average of the last n prices in which the newest bar counts n times, the one before it n minus 1 times, and so on down to the oldest, which counts once. In Altrady Charts it is listed as Moving Average Weighted.

A simple average weights every bar in its window equally. A WMA tilts the weights linearly towards recent bars, so it turns sooner. An exponential average also favours recent bars, but its weights never quite reach zero, so older prices keep a small influence. The WMA has a hard window edge, as the simple average does.

Yes. The indicator has two inputs: Length, default 9 with a minimum of 1, and Source, default close. Open the indicator's settings on the chart to change them. Source accepts open, high, low, close and the averaged sources such as hl2 and hlc3.

There is no single best length. The default is 9. Shorter settings follow price more closely and produce more false signals in choppy markets; longer ones are steadier and later. Choose the length for the timeframe you trade and test it.

No. Each value depends only on the bars in its window, so values on closed bars are not revised. The current candle's value moves while that candle is live and settles when it closes.

Use the Add to chart button at the top of this page. It opens BTC/USDT on Binance in the Altrady Charts terminal with the built-in Moving Average Weighted already applied. On any other market, open the indicator picker on the chart and choose Moving Average Weighted from the Moving Average group.

Add to chart