Naturally, moving averages is a technical indicator that allows you to know how a particular security’s price moves on average, in a period of time. It helps you to highlight trends, provide trade signals as well as spot trend reversals.
Moving averages create a single smooth line that shows the price movement direction. For the better use of moving average here are ways to calculate the simple, exponential and weighted moving average.
Simple Moving Average
It calculates an average of the last price of the last n price on a number of n periods of time. Here is the formula to calculate the simple moving average.
Simple moving average (SMA): (P1+P2+P3+P4 ………+Pn) / n
For instance, there is a four period of SMA asset with prices of 1.2641, 1.2642, and 1.2641. the moving average is 1.2641 [(1.2640 + 1.2641 + 1.2642 + 1.2641) / 4 = 1.2641].
Usually, trading and chart platforms provide the SMA calculation for you. Yet, knowing the formula will help you understand the meaning of it.
With that trading and chart platforms, you just need to choose the SMA indicators from the list, apply it to your chart, and adjust the number of periods you need.
SMA helps you know the exact number that you will get.
Exponential Moving Average
The exponential moving average (EMA) gives the recent prices more weight than the past price. Here is the formula to calculate EMA.
Exponential moving average = [Close – previous EMA] * (2 / n+1) + previous EMA
For instance, there is a four period EMA with these prices 1.5554, 1.5555, 1.5558, and 1.5560. With the last value is the most recent, then, the current EMA value is 1.5558 [(1.5560 – 1.5558) x (2/5) + 1.5558 = 1.55588].
Similar to SMA, you can also find EMA calculation in most trading and chart platforms.
The benefits of using EMA is that it adapts faster to the price changes than the SMA. If the price reverses its direction, EMA will also reverse its direction faster than SMA. That is because EMA gives more weight to the recent price than the last prices.
Weighted Moving Average
A weighted moving average (WMA) works similarly to the EMA. It weights the average of the last price with decreasing weight on each previous price. You can calculate WMA with this formula.
Weighted moving average calculation = (Price * weighting factor) + (Price previous period * weighting factor-1)
WMA gives different weigh according to the number of periods used in the calculation. If you use WMA for four different prices, then, the recent weighting can be 4/10, the period before that can be 3/10, and so on.
For instance, with the price of 90, 89, 88, 89. The WMA is 89.2 from this calculation ((90 x (4/10)) + (89 x (3/10)) + (88 x (2/10)) + (89 x (1/10)) = 36 + 26.7 + 17.6 + 8.9 = 89.2.