homechevron_rightProfessionalchevron_rightStatistics

Weighted moving average

Weighted moving average calculation by candles

Let's continue our series on technical indicators.

If somebody doesn't know what technical indicators, candles and currency pairs are, it's better to start from the first article - Simple Moving Averageе. Others may proceed.

The following indicator - Weighted Moving Average - is on today's agenda.

The thing is, that the simple moving average may show a trend well, but still somehow delayed by unexpected turns. It is clear that it will be delayed by its definition, but people still wanted the mean to quickly respond to the changes of the current situation. So they came up with a weighted moving average.

The idea is simple - when calculating the average, the last candles must have more weight, ie, exert a greater influence on the result. In the simple moving average contribution of each candle is the same, in еру weighted moving average it is proportional to the proximity to the current point of time. The most recent, current candle has the greatest weight.

The weights are introduced as follows (number of calculation periods is denoted by n):

WMA_t=\frac{n close_t + (n-1) close_{t-1} + (n-2) close_{t-2}... + close_{t-n+1}}{\frac{n(n+1)}{2}}

The denominator of the fraction is nothing but the sum of an arithmetic progression 1,2, ..., n
That is, each figure is multiplied by its weight, added to the other and the resulting sum is divided by the sum of weights.

The calculator below calculates the weighted moving average on USDJPY candles examples with a 15-minute compression. For comparison, you can also display a simple moving average line on the graph.

PLANETCALC, Weighted moving average

Weighted moving average

Digits after the decimal point: 2
Moving average

Candles for USDJPY

Items per page:

Comments