Last Updated on 17 November, 2020 by Therobusttrader
Moving averages are some of the most well-known trading indicators in trading, and play a big role in traditional technical analysis. They come in several versions, and the most basic yet powerful type is the simple moving average.
A simple moving average is a plain average of the close prices for the last period, which is plotted as a line on a chart. Traders use the simple moving average to assist with objectives like defining the trend direction and strength, or to know when a market is overbought and oversold.
In this guide to the simple moving average, we’ll teach you everything you need to know about this extremely useful indicator. We’ll touch on trading methods where it plays an integral part, as well as cover the main differences to some of the other most popular versions of the moving average.
Simple Moving Average – SMA Definition and Calculation
The simple moving average, as its name suggests, is a simple average of the close prices for the selected period, plotted on the chart, like the average in the image below
So, the 20-period SMA will plot the average of the last 20 bars, while the 100 period SMA will plot the average of the last 100 bars.
In other words, you just add up the close prices of all the closing prices for your period and then divide it by the number of periods.
Of course, you may use other data to calculate the SMA, like the open or high of a bar, but the close is the most commonly used data point.
Selecting the Best Moving Average Period
Many ask which setting for the moving average that’s the best and will produce the most profit.
We’ll, in order to be able to answer this question, we first need to know what you’ll be using it for. For instance, defining the long term trend will obviously need a much longer period than defining the short term trend.
So, let’s cover the most common simple moving average settings, and what types of analyses that fit them best!
5- Period SMA: This is the shortest period that’s commonly used by traders. The very short length means that it will never deviate too much from the close price, while still providing a smoothened value. This can be especially useful in markets that often experience erratic and volatile moves, where the close of any individual bar simply is too unreliable to use in a trading strategy.
10,15, and 20 period moving averages: Being somewhat longer, these averages start to keep some distance to the close price in certain conditions. These are often used in conjunction with a longer moving average, as we’ll see soon.
50-period SMA- Now we’re starting to get into the middle range in terms of length, as the 50-period SMA gives us an idea about the direction of the medium-term range. As such, it’s commonly used together with both short term and long term moving averages, as a result of residing in the middle of those two extremes.
100 and 200 period SMA: Now we’re starting to get to the really long moving averages that show the long term trend of the market. Especially the 200-period moving average is widely used to determine the long term trend of a market. The most common approach is to regard a market above the 200-period SMA as bullish, and the other way around. The 200-period moving average is also often referred to as a regime filter, which you may read more about in our article about regime filters.
Tip for finding the best SMA Settings
While the settings above certainly outline good guidelines, you may want to use backtesting to ensure that you’re using the settings that fit your market and timeframe.
This basically means that you run a test to see which settings yielded the best results historically.
Which Is the Best Timeframe for the Simple Moving Average?
This is probably the second most common question we get, and the answer generally is that it varies a lot depending on the market.
However, there is one general rule of thumb to follow which is that the higher the timeframe, the more significant results you get.
With this in mind, moving averages tend to work best for daily bars, since this is the setting that’s watched the most by retail traders and bigger market players. In general, this is something that holds true for most types of technical analysis. The amount of random noise simply gets lower with the daily timeframe, which leads to more accurate results.
With that said, moving averages work across many timeframes, and we’ll once again have to recommend backtesting as the best solution to discover what works and not!
Common Applications – SMA Trading Strategies
Having covered some of the most common questions we get about moving averages, we’ll now move on to some of the most popular ways of using the simple moving average. These range from mean reversion approaches to trend following, showcasing the versatility of the moving average in trading!
As always, remember that everything you see here at The Robust Trader or elsewhere should act as inspiration for trading strategies, and always needs to be validated on your market and timeframe!
The perhaps most common way to approach a moving average, is to simply look for shifts in momentum which appear as price crosses above or below the moving average. As the close crosses over the SMA, it signals that the market is turning more bullish, while a cross below it would signal the very opposite.
As such, some traders will choose to go long when the close crosses above the moving average, and vice versa. In the image below you see an example of a trade where we enter on a bullish price crossover, and exit once the close crosses below the moving average.
Another very common approach to using moving averages, is to look for when a shorter moving average crosses over a longer moving average. In other words, this is an approach that’s very common to regular price crossovers.
However, the main difference, which is that we’re using a short term moving average instead of the close itself, has the benefit that we avoid many false signals. The market is very prone to exceeding levels of different kinds, only to revert shortly thereafter. And by using a short moving average, there is a much smaller chance that those small breaches will result in a signal, since a much larger move is needed to make the short average to cross the longer average.
The most common combinations of averages tend to be the following ones:
20 and 50-period moving average: This is a combination that attempts to catch the shorter-term changes in momentum relative to the medium-term momentum. This is also a combination that will produce a lot of signals, meaning that there is a lot of opportunities. However, it also means that you’ll experience more false signals.
50 and 200-period moving average: With this combination, we instead shift our focus to the medium-term trend relative to the long term trend. Usually, this translates to fewer but more accurate signals.
Generally, you also want to make sure that the moving average is sloping in the direction of the crossover. So for a positive crossover to be valid, the longer moving average should preferably slope upwards, signaling that the turn in momentum actually has already begun.
Actually, the 50 and 200 moving average crossover signals have become so common that they have their own names. When the 50-period MA crosses above the 200-period MA, we say that we have a golden cross, while the very opposite signal is referred to as a death cross.
Distance to Moving Average
The two crossover methods mentioned so far all rely on some form of trend following logic. In other words, a trader who uses any of the two methods assumes that markets move in trends that are worth catching.
While this often is a great approach, you definitely should turn your attention to mean reversion as well. In short, mean reversion refers to the tendencies of some markets to perform exaggerated moves in one direction, which are then followed by correcting moves in the other direction.
Mean reversion often works quite well in equities and stocks, but could be successfully applied to other markets as well!
So, how could you use moving averages to define when a market has gone too far?
Well, one quite unconventional way would be to regard the average as a mean, from which price deviates. Then we may demand that the close should reach its longest distance 20-bars back from the average, to enter a trade.
This ensures that the market has gotten really oversold and is about to turn around soon. In the image below you see an example of this very setup.
As you may have noticed, mean reversion trades may continue down a long way before they finally turn around. However, the more a market has fallen, the better the edge gets. That is why it’s why we recommend that you make us of a quite broad stop loss, not to get stopped out too early!
In fact, we often trade mean reversion strategies without a stop loss. However, this is only possible since we trade those strategies with only a small share of our capital. This is, in turn, made possible with the help of algorithmic trading, where we can trade as many as 100 trading strategies at the same time!
Exponential Moving Average VS Simple Moving Average
The simple moving average is just one of several moving average versions. And while we don’t have enough room to cover them all in this article, we’ll just have a brief look at the exponential moving average, which is the second most widely used average.
While the simple moving average is nothing more than a plain average of recent close prices, the exponential moving average isn’t as simple.
The difference lies in that the EMA gives more weight to recent data points to adapt quickly to fast and sudden price swings.
The image below makes this very clear, where you see how the Simple Moving Average clearly lags the Exponential Moving Average.
In our experience, many trading strategies perform somewhat better if you replace the SMA with an EMA instead. However, the performance boost isn’t consistent, and you’ll find that different strategies will react differently.
If you want to learn more about the exponential moving average, we recommend that you take a look at our guide to exponential moving averages.
Spotting Support and Resistance With the Simple Moving Average
One way to use the simple moving average that we haven’t discussed yet is to find support and resistance levels in the market.
Support and resistance, which is covered in our complete guide to support and resistance levels, is when the market considers some levels more important than others. These often are visual levels in a chart, like significant highs and lows.
However, since moving averages are so common, many market participants tend to notice them and react as prices reach those levels.
In the image below you see how the market turned around once it hit the 200-period moving average.
Earlier in the article, we covered which SMA settings that are most common. Those settings mentioned are also the ones that are the most likely to become support and resistance levels, since they are watched by the most market participants. However, out of all the moving average lengths, the 200-period is perhaps the average setting that’s watched by the most market players, thus being the most significant one.
The simple moving average is the perhaps most common trading indicator, and serves many purposes in trading. In this guide, we’ve had a look at the most common ways traders use the SMA, as well as which settings may be the best.
If you’re interested in learning more about moving averages, we recommend that you read our guide to moving averages.