We use cookies to give you the best possible experience on our website. By continuing to browse this site, you give consent for cookies to be used. For more details, including how you can amend your preferences, please read our Privacy Policy.

# Confirming the Trend with the Simple Moving Average Indicator

March 19, 2020 11:23 UTC

This article will discuss how to use a simple moving average (SMA), as a guide to identifying, confirming, and following a market's trend. As a trend indicator, an SMA is a good all-round tool, and one that every trader should have some familiarity with. First things first, what is a simple moving average?

## Simple Moving Average Definition

A simple moving average is the simplest form of a moving average. A moving average is a mean value calculated over a specific number of recent data points. This value is periodically re-calculated, kicking out the oldest value in favour of the most recent period. Let's take a look at a simple example, in order to illustrate how to calculate an SMA:

## How to Calculate a Simple Moving Average

We calculate values using the simple moving average formula:

• Formula : SMA = (Sum of price values for n periods) / n

Let's use some sample prices to show a simple moving average example. Let's say we want to calculate the 10-day SMA using daily closing prices, and let's suppose that we have the closing prices for the last 10 days (an example of this is provided in the table below). The simple moving average period, n, is 10 in our example. So we add our 10 closing prices together to receive the total, and then we divide this number by 10.

• The sum of our values would be: 24 + 26 + 23 + 28 + 30 + 26 + 22 +19 +24 + 20 = 242
• Therefore, the SMA would be: 242/10 = 24.2
 Day Number Example Closing Price 1 24 2 26 3 23 4 28 5 30 6 26 7 22 8 19 9 24 10 20

The next day we would discard our old 'Day 1' value, and instead include the newest day's closing price in our calculation, hence giving us a new average value. The value of the average would change as time progresses, and this is why it is called a moving average. To find a simple moving average is not particularly simple, as you can see in the example provided above.

Indeed, even long before computers and trading tools became commonplace, analysts would work out daily moving averages by performing the calculations manually. If you are calculating for a large number of periods, or if your periods are within short-time frames, the work involved can be very laborious. This is why we enable computers to perform the simple moving average algorithm, so that we can focus our attention on the results of the calculations, rather than the calculations themselves.

## Using the SMA Indicator in MT4

A moving average tool comes bundled with the platform as one of the core indicators, meaning that you don't have to perform a separate simple moving average indicator MT4 download. You will find the 'Moving Average' indicator listed in the 'Trend' folder within MT4's 'Navigator', as shown in the image below:

As you can see in the image above, the moving average indicator in MT4 offers you a choice of more than one type of method. Naturally for an SMA, you choose 'Simple' as the method. The SMA settings that you need to decide on are the values for 'Period', 'Shift', and 'Apply to'. The 'Period' is the same as the 'N' in our SMA formula example from earlier. It refers to how many periods we need to include in our average.

The greater the value for N, the smoother our moving average line will be, but the slower it will react to changes in the price. Smaller values for N will produce a faster-moving SMA line. It will react quicker to changes in the price, but it will be less smooth. Ideally, we are looking for a happy medium that will be smooth enough to allow us to see beyond short-term volatility, and instead focus on genuine trends, but which is also fast enough to provide us with timely signals.

It can be useful to compare a faster (i.e. a shorter period) SMA with a slower (i.e. a longer period) one, as we shall see later on in the strategy section of this article. The 'Shift' is the least important of the SMA settings. The value entered displaces the SMA in time along the time axis, with a positive value shifting the SMA to the right, and a negative value potentially shifting it to the left.

Shifting with a negative value is only useful as a tool for looking at historical data. If you are looking for an SMA for the current period with a negative shift, it is not possible – as you would need a value for a period that has not yet occured, in order to complete the data set. Using the default value of 0 is recommended as a good place to start. The 'Apply to' menu provides you with seven choices.

They include:

1. Close
2. Open
3. High
4. Low
5. Median price - which is (high + close)/2
6. Typical price - which is (high + low + close)/3
7. Weighted close - which is (high + low + close + close)/4

The default setting applies the SMA to close and, once again, this a good place to start. Naturally, some experimentation will help you to decide on the best simple moving average settings. In the image below, a 50-period SMA chart indicator with an hourly chart of the GBPUSD currency pair is displayed as an example:

Depicted: MetaTrader 4 platform - price data from Admiral Markets - GBP/USD H1 chart - Disclaimer: Charts for financial instruments in this article are for illustrative purposes and does not constitute trading advice or a solicitation to buy or sell any financial instrument provided by Admiral Markets (CFDs, ETFs, Shares). Past performance is not necessarily an indication of future performance.

What does the simple moving average tell you?

Primarily, the SMA allows traders to see beyond short-term price fluctuations, and thereby perceive the underlying trends of the market more clearly. Notice in the graph shown above how the Forex SMA indicator smooths out the market movement. The upward trend of the market, in this case, is more clearly seen when reading a simple moving average, rather than by simply looking at the price alone. Also, note how the price remains above the SMA line for the vast majority of the trend.

Here, we have a couple of key points for how to trade with the SMA indicator:

• First, we can use price crossing above the moving average, as an entry signal to buy
• Second, the price remaining above the moving average is confirmation of an uptrend

The converse is also true: we can use price crossing below the SMA as a sell signal. The price remaining below the SMA is a confirmation of a downtrend.

Get all of this and much more by clicking the banner below and starting your FREE download!

Now let's continue by looking at how to use these concepts as part of a simple moving average trading strategy:

## Trading Strategy: SMA Crossover Indicator MT4

The simple moving average crossover strategy is a fairly basic trend-following system. It looks at two different price series, and provides a trading signal when one crosses over the other. In the chart above, we saw that the price crossing was above a 50-period moving average. As an alternative, we can also use another moving average instead of the price.

The key is that the direction of the signal is given by the direction of the cross of the faster-moving price series, over the slower one. So, for example, you might use a 20-period moving average as the fast series, and a 50-period moving average as the slower one. If the 20-period MA crossed above the 50-period MA, it would be a buy signal. If the 20-period MA crossed below the slower MA, it would be a sell signal.

Following such signals is effectively an example of simple moving average forecasting. Therefore, we are using our moving average as a likely guide to the future performance of the market. Of course, such simple moving average forecasting relies on a key assumption – namely, that future data values will tend to follow the trend. As we all know, historical values may not accurately predict future values, and there may, in fact, be many times when the trend breaks down.

Historical data is an imperfect guide to the unknown of tomorrow, but it remains one of the few guides available. When looking at historical data, there is a pertinent question of how much historical data to incorporate. Do we consider all previous data as relevant? Or do we decide that only the most recent data is of any bearing for what will happen next? Moving averages attempt to provide a simple, but effective rule of thumb to the problem, considering the mean value over a certain window of observation.

We can come up with other trading strategies by combining the MT4 slope indicator with other trading tools. One way to do this is to use an SMA as a trend filter, and then use another indicator for the trading signals. For example, you could use Keltner Channels for entry signals, buying when the price breaks above the Keltner Channels, or selling when it breaks below the envelope. The filter comes into play by only following signals that agree with the direction of the larger trend.

That is to say, that we can only buy if the market price is above our SMA, and we can only sell if the price is below our SMA. Keltner Channels are just one of the many additional tools that you gain with MetaTrader Supreme Edition. MT4SE is a custom plug-in for MetaTrader that greatly expands the functionality of the platform – and it is free to download!

## Simple Moving Average vs Exponential Moving Average

As we saw from the 'Type' dropdown in MT4, there are several types of moving averages available. The two most common are the Simple Moving Average and the Exponential Moving average (EMA). As we have seen, an SMA has no weighting – because all data points are treated equally when calculating the mean value. With an EMA, weighting is applied, with more recent data values carrying more weight when calculating the average.

Because moving averages look back and incorporate older data points, they are inherently lagging in nature. Changes within a moving average will occur after the market price has already started moving. This is why the chief use of a moving average is as a trend-confirmation tool. Weighted moving averages attempt to mitigate the lag by focussing more on recent data points, assuming that more recent data is more relevant for predicting what might happen next.

An exponential moving average weights previous data with a weighting, that exponentially decreases with time. There is a trade-off however, in that it may not smooth out price fluctuations efficiently. When comparing an SMA to an EMA, one is not inherently better or worse than the other; it is more a question of understanding the difference, and using what better suits your requirements.

Probably the best way to work out what works for you is to test them both. Using a Demo Trading Account will allow you to do this as many times as you need, as it allows traders to test their strategies within in a risk-free trading environment, before they transition to the live markets.

## The Simple Moving Average Model: Summary

We have looked at how to find the simple moving average by adding up all the data points within a given number of periods, and then subsequently dividing them by the number of periods. We've also see how using a simple moving average smooths price fluctuations, and makes the apparent trends clearer.

Moving averages can be used for all instruments – For instance, a stock SMA indicator will work just as well as a Forex one. It is, therefore, a versatile tool with a variety of uses for informing us about the market trend. We hope you enjoyed this discussion of Simple Moving Averages. If you would like to learn more about trading indicators in Forex, why not check out our article on the best and most important Forex indicators?