Of all the many trading adages that are bandied around, perhaps the most common is 'the trend is your friend'. As well worn as this phrase may be, it does contain a fair dose of truth. Many profitable trading strategies revolve around entering the market when there is an above average chance of a new trend forming. When a trend does occur, the key is to hold on for as long as the trend persists.
This article is going to discuss an essential trading indicator that can be used as a means of identifying trends. But this is not its only use. The indicator has other wider applications for helping sift through the noise of price fluctuations.
So what is this useful tool?
I'm talking about the moving average indicator (MA indicator).
You can calculate a moving average over any data set that changes with time, but in technical analysis its most common usage is with price. A moving average is a continuously calculated value of the arithmetic mean of the price over a specified time period. The moving part of the name is there because we calculate a new value as each time frame advances, so that the value of our average adjusts with changes in the price.
So, for example, we might use a 30-day moving average. The value is the arithmetic mean of the price over the previous 30 days. In other words, we sum each of those 30 closing prices and then divide by 30. This value is calculated each day, discarding the oldest value in the data set in favour of the most recently transpired day.
The effect of a moving average is to smooth out price fluctuations. This helps us to look beyond transitory or insignificant blips in price and see instead the longer-term tendency of the market.
Economists and analysts have used moving averages in their studies for a long time. Back in the days before the personal computing revolution, such calculations would be done by hand or with the help of a calculator. Needless to say, this was time consuming. As a consequence, calculations tended to be restricted to end-of-day data.
Of course, we are in a much more convenient position today, having values for pretty much any time frame we desire, available at the click of a button. So let's click some buttons in MetaTrader 4 and see how the moving average indicator works.
As one of the more common technical indicators, it is no surprise that we don't need to make a separate moving average indicator download when using MetaTrader 4. Moving average comes as one of the standard set of tools with the trading platform.
You'll find the MT4 moving average indicator inside the Trend folder in MetaTrader's Navigator, as shown in the image below:
This image also shows the dialogue box that opens when you click on the MA indicator. The three main variables to choose are:
When it comes to the method, there are several complex types available beyond the simple moving average (SMA). The most common of these is the exponential moving average (EMA). The exponential moving average gives more weight to more recent price values. The amount by which this weighting decreases for each successively older price value is exponential, hence the name.
The image below shows the MT4 MA indicator added to an hourly GBP/USD chart:
Specifically, the Forex moving average applied here was a 30-period SMA for the close. For each point plotted by the MA indicator for a specific hour, the value is calculated as the arithmetic mean of the GBP/USD closing price for each hour, going back over the previous 30 hours.
Notice how the moving average smooths out short-term fluctuations in the price. You can think of it as guide, helping you to see the big picture of what the market is doing.
The most basic strategy is to simply compare the moving average to the current price. From a trend-following perspective, if price moves above the moving average, it is a bullish indication. If price falls below the moving average it is bearish. When a new trend forms, we will always see the price breaking out from the moving average in these ways. This really is quite a rudimentary method, though. You should be mindful that the price will often cross over the moving average without a trend subsequently forming.
We can also come up with other strategies by adding more than one Forex moving average indicator to our price chart. Let's start by looking at a strategy that utilises two moving averages.
This a simple strategy that gives you a signal to trade when a faster moving average crosses over a slower one. Have a look at the hourly GBP/USD chart below. I have added a 30-period Forex moving average, which appears as a thin, dotted red line. I have also added a slower 100-period moving average, which is the thicker green line:
The rules of the strategy are simple — when the faster MA crosses above the slower one, you buy. When it crosses below, you sell.
As you can see, at 22.00 on 25 April, the faster MA crossed above the slower MA. This was our signal to buy. Note how the price continued to trend higher after we received the buy signal.
This trading system always leaves you with a position in the market, either long or short. The signal to close your position would be when the faster MA crosses back below the slower one. At this point you would square and reverse, going short in the market.
So what can we do if we don't always want to have a position in the market?
We can use a slightly more complex version of the strategy that uses three moving averages instead of two. This is the triple moving average strategy.
As the name suggests, this strategy uses three moving averages: one fast, one medium, and one slow. The trading signals are generated by the fastest moving average crossing over the medium-length average, just as with the dual strategy.
There is an additional rule, though. This rule has the slowest moving average to act as a trend filter. That is to say, you only place a trade if the two faster MAs are the right side of the filter. To go long, both need to be higher. To take a short position, both need to to be lower.
The daily GBP/USD chart below shows three moving averages added for this strategy. The dotted red line is a 150-day moving average. The thick green line is a 250-day moving average. The dashed blue line is a 350-day moving average — this is our filter line.
Note there are two points on the chart where the fast red line crosses the green line. The first time is a cross above, indicating a buy signal. But because our signal lines are beneath the filter, we do not trade at this point. The second time though, when the fast red MA crosses beneath the medium-length green one, we go short, because both lines are the correct side of of the blue filter line for a sell.
It's a testament to the versatility of moving averages, that the technique is often incorporated as part of more complex indicators and trading methods. A well-known example of this is the method of Bollinger bands. Bollinger bands utilise a moving average envelope — that is, plotting lines a certain distance above and below a moving average. These lines are known as bands or envelopes. In the case of Bollinger bands, the lines are a volatility envelope. They are placed a certain number of standard deviations from the moving average which means the bands widen or narrow according to the volatility of the market. Bollinger bands trading, therefore, is a type of moving average envelope strategy that takes into account the volatility of price movements.
We said earlier that simply comparing price to the moving average may provide false signals — tricky times when the price crossing the MA does not result in a trend. These false signals may be exacerbated by highly volatile markets. Using a volatility envelope can, therefore, be an effective way to mitigate this problem to some degree.
To read more on trading with Bollinger bands, take a look at our rundown of the Most Important Forex Indicators.
You can also apply the MA indicator on top of another indicator, rather than applying it solely to price. You might do this as a smoothing technique if you feel the results of an indicator are so choppy that they make an underlying pattern unclear.
Which is the best moving average indicator strategy? There's no single one-size-fits all answer to this, because the most suitable strategy will depend on the specific preferences of the individual.
One way to help you decide what works best is to backtest your strategy. The trading simulator that comes as part of the MetaTrader 4 Supreme Edition plugin is a great way to manually test different strategies.
It's a similar story when it comes to picking a suitable timeframe for your averaging. If you are dealing on shorter time frames, you will need to be dealing with a suitably fast-moving indicator. So, if you are day trading moving averages, it makes sense for you to use 30-period moving average on a 15-minute chart. If you are a long-term trend follower, you may find that something as long as a 350-day moving average is more appropriate.
A useful way to conclude which settings are best for your strategy is to experiment with a Demo Trading Account. This will allow you to fine-tune your system to react as you desire — without taking on unnecessary risk while you are still operating in trial-and-error mode.
Moving averages have many applications in trading. The beauty of the indicator is that you can make it as simple or as complicated as you need. At the simpler end of the spectrum, the indicator can help smooth out fluctuations in a choppy market. This makes it easier to see what is happening without the noise of volatility. Another basic use is as a rudimentary yardstick of the trend of the market over a given timeframe. A rising MA suggests an upward trend and a falling MA suggests a downtrend, as we have seen.
Of course, you can increase the complexity substantially from there, with weighted-moving averages and different cross-over strategies incorporating multiple moving averages. We've covered just a couple of types of such cross-over strategies here, but there is tremendous scope for further modifications.
Bear in mind, though, that an increased level of complexity does not necessarily translate to increased success. Sometimes keeping it simple can be effective and is a very sensible way to start out.