Identifying the direction of the market trend is key to trading any financial markets, not just the forex market.
Traders and technical analysts have different ways of determining the trend direction, but the moving average indicator is perhaps one of the most common technical indicators used for that purpose.
The unique thing about the moving average indicator is that it smoothens the price data so that you can have a clearer picture of where the market is headed.
Forex traders and technical analysts find it very useful in their study of price behavior since it can tell a lot about how the price moved in the past, which could be a clue to what can happen in the future.
In this post, we will show you the various ways to use moving averages in your trading, but first, you need to know what the indicator means, the various types, and how to set it.
What does the moving average mean?
As the name implies, the moving average is an average of specific price data over a specified period, and since the price is continuously moving and generating new data, the average is also changing continuously — hence, the name moving average.
At the most basic level, the indicator automatically sums up the specified price data (close, open, high, or low) over a given number of trading sessions and divides by the number of trading sessions.
It does this continuously as more price data are generated with each new trading session, giving rise to an unbroken indicator line.
Being an average, the indicator smoothens out the price data so that you can see the direction of the trend and be able to distinguish it from the usual market noise.
But this smoothening effect comes at a price — the indicator lags the price, which means that the indicator moves only after the price has moved.
In fact, the larger the averaging period, the smoother the indicator would be and the more it would lag.
As a result of this lagging feature, a moving average indicator line tends to stay below the price in an uptrend and above the price in a downtrend.
The slope of the moving average can tell the possible direction of the price trend, while the steepness of the slope can tell how strongly the price is moving in that direction.
Thus, if the indicator is sloping upward, the price is likely in an uptrend, and if the slope is pointing downwards, the market is possibly in a downtrend.
Furthermore, if the indicator is flat, it means that the market is moving sideways.
However, as we hinted above, the number of the averaging period would determine how fast the moving average line reacts to price changes.
If the averaging period is short, which means that fewer price data are used in the calculations, the indicator reacts faster to price changes and stays closer to the current price.
Conversely, if a longer period (more price data) is used, the indicator reacts slowly to price fluctuations and stays further away from the current price bar.
Types of moving average
There are four main types of moving averages:
- Simple Moving Average
- Exponential Moving Average
- Linear-weighted Moving Average
- Smoothed Moving Average
Simple Moving Average (SMA)
This is the most basic type and is calculated as the arithmetic mean of the specified price data over a given period (number of trading sessions).
A trading session can be any chart timeframe you’re using.
So, if you were to calculate an 8-period SMA on your H4 timeframe using price close, you would take add the values of the closing price of the last 8 trading sessions and divide by 8.
For example, if the last 8 closing prices on your H4 chart is 10.1, 11.2, 9.9, 7.8, 10.5, 12.0, 13.5, and 13.0, the SMA value for that time would be 11.
By the time the next H4 session closes (say it closes at 14.1), the 14.1 is added in the calculation while the 10.1 will fall out of the last eight trading sessions and will no longer be used in the calculation.
So, you will get 11.5 as the new SMA. All the calculations are done automatically by the trading platform.
Exponential Moving Average (EMA)
In the EMA, more weight is given to the latest price data using a complex formula which we won’t be discussing in detail here.
What the formula basically does is that it gives the most recent price data the most weight, while it gives the oldest price data in the period under consideration the least weight.
Using our price data example above, 13.0 carries the most weight, while 10.1 has the least.
When the 10.1 was dropped and the new data, 14.1, added, the 14.1 will take the most weight, while 11.2 takes the least.
The essence of ascribing the most weight to the most recent data is to make the indicator more sensitive to recent price changes than outdated price data.
Thus, for the same period, the EMA line is closer to the price bars than the SMA line.
Linear-weighted Moving Average (LWMA)
Just like the EMA, the LWMA assigns more weight to the most recent price data.
But the weight reduces linearly as you go further away from the recent price data, unlike the EMA that uses an exponentially weighted multiplier to give greater weight to most recent price data.
In this price series above — 10.1, 11.2, 9.9, 7.8, 10.5, 12.0, 13.5, and 13.0 — if 13.0 is given a weight of 8, for example, 13.5 gets a weight of 7, and it continues decreasing until you get to 10.1 which is assigned a weight of 1.
Smoothed Moving Average (SMMA)
The SMMA is a sort of combination of the SMA and the EMA. It does not use a fixed averaging period, instead, it uses all the available historical data in its calculation.
Thus, while more weight is given to recent price data, the historical price values do also affect the result, giving a smoother indicator but with more lag.
Calculating today’s SMMA involves subtracting yesterday’s SMMA value from today’s price data and, then, adding what you got to the yesterday’s price data. So, it is a cumulative value.
How to add a moving average to your chart: the settings
It’s easy to add a moving average to your chart. How you do that depends on your charting platform.
If you’re using Tradingview, click on the indicator toolbar and search for the type of moving average you want. You can then input your preferred settings.
On the MT4 or MT5 platform, you click on the “Insert” button at the top-left corner of your chart and select “Indicators” from the droplist.
Then, from the next droplist, select “Trend” and click on “Moving Average”. A window will appear, just like in the chart below.
Under parameters, you can select the period you want, the type of price point (close, open, high, low, median, etc.), and your preferred MA method — Simple, Exponential, Linear-weighted, or Smoothed.
The visualization helps you choose the timeframes you want the indicator to appear in — you can select “Show on all the timeframes” if you want the indicator to appear in all timeframes.
Using moving average in your trading
There are many ways you can use moving average in your trading, but before we delve into the discussion, you should note this: the moving average indicator is only useful in a trending market.
Having said that, here are some of the ways the indicator can be of help to you:
- Choosing the markets to trade
- Identifying the direction of the trend
- Identifying potential price reversal levels
- Developing a trade signal
Choosing the markets to trade
Even if your primary interest is in the currency market and CFDs on commodities and indices, it is still a daunting task selecting which currency pair, index, or commodity to trade at a time.
So, you will need to have a way of choosing the right market to trade. Your aim should be to pick a market in a strong trend — for a long trade, go with the market with the strongest uptrend and for a short position, go for the market with the strongest downtrend.
But how do you determine the strength of the market trends? This is where the moving average indicator can help you.
You can use the indicator to compare the strength of the trend in various markets. — remember, the steepness of the moving average shows how strong the price trend is.
It is necessary to only compare closely related markets. By closely related markets, we mean you don’t compare a currency pair with an index or a commodity.
So you can compare the Dow, S&P 500, and Nasdaq, or you compare silver, gold, platinum, and palladium.
Even within the currency market, it’s better to compare currency pairs with a common base currency or a common quote currency.
Thus, you compare AUD/USD, NZD/USD, EUR/USD, and GBPUSD, or you compare USD/CAD, USD/JPY, and USD/CHF.
This is what you do:
- Open the charts of the markets you want to compare .
- Attach a moving average indicator on each chart, say 50 SMA, LWMA, or EMA
- Check the steepness of the moving average indicator in each market
- Select the one with the steepest indicator line
Take a look at the 2 charts below —USD CAD and USD JPY . It’s obvious that the USD CAD is in a stronger uptrend.
Identifying the direction of the trend
One of the most common uses of the moving average indicator is to identify the direction of the trend in the timeframe you’re trading.
While there are other ways to identify a trend — for, example, using the direction of successive swing highs and lows — it is much easier to use the moving average indicator, which is why most new traders depend on it to identify the direction of the trend.
For this purpose, you check where the slope of the indicator lies. If the indicator is pointing upwards, then, the trend is up, and if the indicator slopes downwards, the trend is likely in the downward direction.
Note that the averaging period of the indicator matters — a shorter-period moving average may point in the opposite direction because of a pullback when the trend itself hasn’t changed direction.
The short-period moving average tells you the direction of the short-term price swings, while a long-period moving average, such as the 100-period SMMA or 200-period SMA/EMA, shows you the long-term trend direction.
Sometimes, there may be a big lag in the long-period moving average, such that the trend may have changed direction, but the indicator’s slope hasn’t changed.
Aside from the slope of the indicator line, another (probably more sensitive) way of using the indicator to show the trend direction is observing the location of the short-period moving average relative to the long-period moving average.
If the short-period moving average is consistently above the long-period counterpart, the trend is likely upwards, but if the short-period moving average is consistently below the long-period one, the trend is likely downwards.
A third method (possibly the most sensitive) to gauge the trend direction using a moving average indicator is to note the position of the price bars in relation to a long-period indicator line.
When the price bars are mostly above the indicator line, the price is likely trending up, and if the price bars are mostly below the indicator line, the trend is likely downwards.
The chart below is that of USD CAD and has been in an uptrend for a long period of time, that may be about to change with the way the price has been dropping in the last few days.
Notice that the price has mostly been above the 100-period SMMA line; the 21-period EMA has been above the 100-period SMMA; while the slope of the 100-period SMMA is upwards.
In the EUR GBP chart below, the market is in a steady downtrend. Notice that the price has mostly been below the 100-period SMMA line; the 21-period EMA has consistently been below the 100-period SMMA; while the slope of the 100-period SMMA is pointing downwards.
Identifying potential support and resistance levels
Another thing you can do with the moving average indicator, especially the long-period ones, is identifying potential value levels in the market, where the price can reverse after a pullback.
These levels often become established support and resistance levels, and as a result, the long-period moving average line is usually regarded as dynamic support and resistance levels.
In a market that is trending up, the long-period moving average indicator line usually stays below the price bars and, thus, can serve as a potential support level where a downward price swing may reverse from.
So, in this kind of market, it’s good to look for bullish trade setups, especially when the price pulls back to the indicator line.
When a market is in a downtrend, the long-period moving average line tends to stay above the price most of the time.
So, it can serve as a potential resistance level where a price rally can turn back and drop again.
In such situations, you are better off looking out for bearish trade signals only when the price is around the level of the moving average line.
The XAUUSD chart below shows an uptrend that started forming, the price pulled back to the 100-period SMMA line, which acted as a support level.
In the GBP CHF chart below, you can see that the market is in a downtrend.
On several occasions, the price rallied and reversed around the 100-SMMA line which has been acting as a dynamic resistance level.
Developing a trade signal
Apart from using moving averages to determine the market to trade, the direction to trade, and the levels to look for trade setups, you can also use the indicator to formulate a trade signal.
A trading signal or trade trigger is a setup that, once it occurs at the appropriate place in the market, is an indication to place a trade immediately.
There are two types of trade signals you can develop with moving averages:
- Price crossover
- Moving average crossover
This type of signal occurs when the price crosses above or below the moving average. Crossing above the moving average may be a signal to go long, while crossing below the moving average may be a signal to go short.
With this type of signal, the stop loss can be above or below the swing high/low preceding the signal, as the case may be.
In the EURGBP chart below, the both white arrows show where the buy signals occurred, and where the sell signals occurred.
The thin yellow lines represent possible fixed stop loss levels. For this type of trades, you either get stopped out (which didn’t happen in all four signals) or it hits the profit target, which could be 2:1 reward/risk ratio or the opposite end.
It is important to note that the price crossing a moving average doesn’t necessarily result in a tradable signal.
Factors that determine whether a price crossover can be a tradable signal include:
- The structure of the market — trending or ranging market
- The direction of the price crossover relative to the trend
- The price level where the price crossover occurred
Moving average crossover
A moving average crossover signal occurs when a short-period moving average crosses above or below a long-period moving average.
Crossing above the long-period moving average, which is known as a golden cross, is regarded as a buy signal, while crossing below the long-period indicator is known as a death cross and indicates a sell signal.
Not every moving average crossover should be seen as a tradable signal though.
Other factors need to align with the direction of the crossover before you will consider trading it.
For instance, while a death cross occurring in an uptrend may seem like a potential change in trend direction, it may not be advisable to go short there.
But if a golden cross follows up on that, it would be a good buy signal — meaning that the death cross was only a deep pullback, as you can see in the GBP CHF chart below
This is also true for a downtrend. It is not uncommon to see the short-period moving average to cross above the long-period counterpart in a downtrend and later cross back when the trend continues in the downward direction.
That was exactly what happened in the EUR GBP chart below. The long-period moving average (100-period SMMA) is sloped downward, indicating an established downtrend.
Notice the white arrows which show when the 21-period EMA crossed below the 100 period SMMA (a death cross) after the prolonged pullbacks.
Entering a trade at the first white arrow, with a stop loss above the swing high, would’ve still resulted in a winner despite the back and forth price movement.
The whole point is this: look for a golden cross in an already established uptrend, and watch out for a death cross in an already established downtrend.
Setting stop loss
Since the moving average indicator line, especially the long-period one, can act as dynamic support or resistance level — depending on the type of trend — it would make sense to set your stop loss beyond the indicator line.
The indicator can help you in placing both a fixed stop loss and trailing stop loss.
Fixed stop loss
A fixed stop loss is one you place at a particular price level and leave it there till the trade completes. So, the trade can either have a successful outcome by hitting your profit target or gets stopped out at the fixed stop loss.
In theGBP USD chart below, a fixed stop loss at that level would not have been hit even with the rally that surged above the indicator line later on.
A trailing stop is a stop loss order that gradually moves in the direction of the trade to lock in profits as the trade becomes more profitable.
It follows the price at a certain distance away, as long as the price is moving in the direction of the trade.
Moving averages are one of the indicators commonly used to trail the price when riding a trend.
It can be done manually by repeatedly adjusting the stop loss order as the indicator line progresses in the direction of the trade.
But it’s best to have a script or an expert advisor that automatically moves the price in the direction of the trade as the moving average continues moving in that direction.
Those scripts have settings where you can indicate how far away you want the stop loss to be from the moving average line.
In the GBP USD chart below, if a trade was entered at the level mentioned on chart, and a stop loss order was set to trail the price a few pips away from the moving average line, the trade would have been on as the price continued to drop for a long time, till the price significantly broke above the indicator line.
Putting it all together: moving average trading strategies
As you can see, there are a lot of things you can do with moving averages. But how do you put your knowledge of the indicator into a reliable trading strategy? The thing is, you can either use moving averages as a background supporting factor for your trade setup and risk management or you make it the trade setup itself.
Here are the strategies you can trade with moving averages.
Pullback reversal strategy
As with other moving average trading strategies, the pullback reversals strategy is traded in the direction of the trend.
It involves waiting for the pullback to reverse so that you can ride the next price swing in the direction of the trend.
When you are trading this strategy, you can use a long-period moving average to identify potential pullback reversal levels where you look for your trade setups.
Your trade setup can be a price action pattern or an indicator signal. If a bullish candlestick pattern or indicator signal occurs when the price pulls back to the moving average line in an uptrend, go long and place your stop loss below the preceding swing low.
In a downtrend, a bearish candlestick pattern or indicator signal occurring after a pullback to the moving average line is a trigger to go short — place your stop loss above the preceding swing high.
Whichever the direction of the trend, you may choose to ride the trend with a trailing stop loss a few pips above or below the moving average line — as the case may be.
Alternatively, you can have a profit target at a Fibonacci expansion level, a 2:1 reward/risk ratio, or a previous swing high/low.
In the USD CHF chart below, the market was in an uptrend, and the price pulled back to the 100-period SMMA.
A bullish pin bar occurred at that level, Notice that the stochastic indicator gave an oversold signal the first time the price got to that moving average line.
The USD CAD chart below shows a downtrend, with the 100-period SMMA acting as a descending resistance level.
The first setup was a Doji pattern that occurred on the indicator line . Notice that the stochastic indicator also gave a classical overbought signal .
Price crossover with the trend
Just like we discussed above, the price crossing a moving average indicator can be a tradable signal if the conditions are right.
The best way to trade this strategy is in the direction of the trend, and it’s preferable to use a long-period moving average.
In a trending market, it’s not uncommon to have a deep pullback that crosses the moving average line and later cross back again in continuation of the trend.
In an uptrend, if the price crosses below the moving average line, wait for it to cross back above it.
Once a price bar closes above the moving average line, go long and place your stop loss below that price swing low — see the chart below.
You can choose to ride the trend with a trailing stop loss a few pips below the moving average line, or you place a profit target at 2:1 reward/risk ratio, previous swing high, or a Fibonacci expansion level.
In a downtrend, when the price crosses above the moving average line, wait for it to cross back below it.
Whenever a price bar closes below the moving average line, go short and place your stop loss above the swing high — as you can see in the chart below.
You can choose to ride the trend down and have your trailing stop a few pips above the moving average line, or you place a take profit at a previous swing low, a Fibonacci expansion level, or a 2:1 reward/risk ratio.
Moving average crossover strategy
This strategy is just as we discussed above — in an up-trending market, go long when the short-period moving average line crosses above the long-period moving average line (a golden cross) after a deep pullback and place your stop loss below the swing low, as you can see in the chart below.
You can choose to ride the trend up with a trailing stop a few pips below the moving average line or place a profit target at the right level.
If the market is in a downtrend, go short when the short-period moving average line crosses below the long-period moving average line (a death cross) after an extended pullback.
Put your stop loss above the swing high — see the chart below. You can choose to ride the trend down with a trailing stop a few pips above the moving average line or put a profit target at a suitable price level.
Moving averages are about the most commonly used indicator among financial market traders — both price action traders and indicator followers use it.
A lot of things you can do with moving averages — study them and formulate a strategy that suits you.
However, the three common strategies that are based on moving averages are pullback reversals, price crossover, and moving average crossover, and all of them are preferably traded in the direction of the trend.