A Beginner’s Guide to Simple Moving Average
A simple moving average, or SMA is one of the straightforward technical indicators to understand, calculate and use.
A moving average is the average of data points (usually prices) over a period of time.
Why is it named “moving”?
It is due to each data point being calculated using the previous X data periods. A moving average forms a trend-following indicator. It smoothes the data by taking the average of the previous data.
Simple Moving Average
A Simple Moving Average can be calculated by adding the closing prices of the last ‘X’ periods and dividing that number by X.
Don’t worry; we’ll make that clear.
Calculating the SMA
Actually, the SMA formula is quite similar to finding the arithmetic mean of the sample data.
|Days||Day 1||Day 2||Day 3||Day 4||Day 5||Average Price of the latest 5 days|
|Price||200||205||210||220||225||(200+205+210+220+225)/5 = 212|
It’s actually Easy Peasy!!
Its formula can also be written as:
FORMULA = (X1 + X2 + X3 + X4 + Xn)/n
Xn = price on the nth candle
n = period of the SMA. Here in example, n=5.
However, with the addition of more days, the calculation will be:
|Days||Day 1||Day 2||Day 3||Day 4||Day 5||Day 6||Day 7||Average Price of the latest 5 days|
|Price||200||205||210||220||225||250||255||(210+220+225+250+255)/5 = 232|
Day 1 and day 2 data is replaced by Day 6 and day 7 data means data is shifted; hence the name moving average.
A simple Moving average does not forecasts price direction. Instead, it gives the current direction. Moving averages are based on past prices, so they tend to lag. Nevertheless, investors use moving averages to smooth out price movements and filter out noise.
Since we’re averaging past price movements, we’re only looking at the general path of the recent past and the general direction of the “future” short-term price movement.
Uses of Simple Moving Averages
Simple moving averages are used to smooth prices, but they create a lag while doing so. The longer the moving average period, the greater the smoothing and lag. SMA excludes data older than the moving average period.
Usually, moving averages generate signals, identify trends, and calculate mean-reverting systems. Moreover, trend-following systems and other indicators, such as MACD, Bollinger Bands, etc., can also be calculated with it. Besides price, it can also be applied to other indicators such as RSI, Stochastic Oscillator, volume, etc.
Let’s look at how simple moving averages smooth out the charts.
As shown in the chart above, we have plotted three different SMAs on the USD/JPY hourly chart. Here you can see the longer the SMA period, the more the price lags. As evident, 50 SMA lags far behind the other 30 SMA and 5SMA. It is because 50 SMA sums up the ending prices of the last 50 periods and divides it by the number 50. SMAs can also show the overall market sentiment at that particular time.
The simple moving average is commonly used in technical analysis. However, it is unreliable and more sensitive to price fluctuations. Therefore, trading should be done with extreme caution. Additionally, at the same time, strategies such as applying limit loss techniques should be used.