Below we’ll explore the 2 most commonly used moving averages – The Simple Moving Average and The Exponential Moving average. There are others like the weighted moving average, the double exponential moving average, the triple exponential moving average and the displaced moving average. We won’t touch on these here.
The Simple Moving Average (SMA)
Here's the last 15-day closing prices for our chart and the 15-day SMA calculation - Starting from our last known data point on the 6th Aug 2009:
Our closing prices: 52+ 51 + 56 + 55 + 51 + 52 + 48 + 48 + 49 + 48 + 47 + 47 + 48 + 49 + 48 = Total 749
Our 15-Day SMA: 749/15 = 49.9
This also works in other time frames. If the chart was an hourly chart, i.e.calculating data on an hourly basis, our 15-period SMA (note: it's not a 15-day SMA any more, because we're working with hourly data) for the last period will be calculated by adding the last 15 end of period prices we have and dividing by 15.
To get a 45-day SMA we add the last 45 days closing prices and divide by 45 to get the last period's 45-day simple moving average. All these SMA points will then be linked to smooth out our SMA price line as in the chart below. The SMA is smoother if the SMA has a higher number, as the volatility has been airbrushed out. You can see this quite clearly in the below Simple Moving Average Chart. Let's look at the 12th May on the chart, there was a spike in price, but the moving averages ironed this spike out. Some argue that the SMA is limited because it weights all it’s price points equally, i.e data taken 45-days ago is equally as important to data accumulated 2 days ago. These people argue that more recent data is more significant. This is where the EMA comes into play - both have their advantages and drawback, which will be explained in the next paragraph.
Simple Moving Average Chart Example
The EMA gives more weight to recent past closing prices rather than give the same weight to all the price points in the last data period. E.g. In a 15-day EMA more weight is given to day 15 than day 1 prices. The EMA gives a greater weight to more recent price action, reacting faster to future price movement and determining where the price is heading in the future. This is why many traders prefer the EMA, but in the below paragraph we’ll look at the differences.
Learning the EMA equation is unnecessary as most trading chart software calculates this for you. But here it is anyway:
In the below chart (EMA versus SMA) we can see the reaction speed between the EMA and SMA. The blue EMA reacts more quickly to price movement than the black SMA line. Traders will generally use the EMA to determine short-term price movements and the SMA when trading longer term as the SMA generates less false trading signals.