start learning →
intermediate10 min read

Trend following and moving averages: SMA, EMA, crossovers and their limits

How simple and exponential moving averages are calculated, what they actually show about a trend, why crossovers lag, and where trend-following approaches tend to struggle.

key takeaways
  1. A moving average is an average of past prices; it describes the trend that has already happened and always lags.
  2. An EMA reacts faster than an SMA of the same length, which means earlier signals and more false ones.
  3. Crossovers tend to look impressive in strong trends and produce repeated small losses in sideways markets.
  4. Trend following accepts many small losses in exchange for occasional large moves; the maths only works with strict risk control.
  5. No moving-average setting is the right one; any setting chosen by looking back at a chart is at risk of overfitting.

A moving average smooths price by averaging the last N closes, so you can see the direction of a trend without the noise of each candle. Trend followers use moving averages to define whether a market is trending and to decide when to stay with a move or step aside. Because a moving average is built from past prices, it always lags: it confirms a trend after it has started and signals a reversal after it has happened.

What "trend" actually means

Before using any indicator, it helps to define the thing you are measuring. A trend is a sustained directional move in price. Traders define it in a few common ways:

  • Price structure. An uptrend makes higher highs and higher lows; a downtrend makes lower highs and lower lows. This is the oldest definition and needs no indicator. If the structure breaks (for instance, an uptrend makes a lower low), the trend is in question.
  • Moving average slope. If a 50-day average is rising, the market has, on average, been going up over that period.
  • Price relative to an average. Price above a long moving average is often taken as an uptrend; price below, a downtrend.
  • Change over a period. Some systematic traders simply ask whether price is higher or lower than it was, say, three or twelve months ago.

All of these are descriptions of the past. They become useful only if trends tend to persist, which they sometimes do, especially when driven by slow-moving forces such as diverging interest rates (see central banks and interest rates). But "sometimes" is the important word. Markets also spend long stretches moving sideways, and that is where trend tools struggle.

The simple moving average (SMA)

A simple moving average adds up the last N closing prices and divides by N. A 20-period SMA on a daily chart is the average close of the last 20 days. Each new day, the oldest close drops out and the newest is added.

Worked example (illustrative prices): the last five daily closes of a currency pair are 1.1000, 1.1020, 1.1010, 1.1040 and 1.1030. The sum is 5.5100, so the 5-day SMA is 5.5100 / 5 = 1.1020. If tomorrow closes at 1.1080, the first close (1.1000) drops out and the new sum is 5.5180, giving an SMA of 1.1036. The average rose 16 pips while price jumped 50: that difference is the lag in action.

Every price in the window counts equally. That makes the SMA smooth and stable, but it also means a price from 19 days ago matters as much as yesterday's. A large move dropping out of the window can make the average change direction even if price today does nothing, an odd effect sometimes called the "drop-off" effect.

The exponential moving average (EMA)

An exponential moving average gives more weight to recent prices. Each day, it moves part of the way from its previous value towards the latest close. The fraction it moves is called the smoothing factor, usually calculated as 2 divided by (N + 1). For a 20-period EMA, that is 2 / 21, or about 0.095, so each day the EMA closes roughly 9.5% of the gap between itself and the latest price.

Worked example: yesterday's 20-period EMA was 1.1000 and today's close is 1.1100, a 100-pip gap. The EMA moves about 9.5 pips towards price, to roughly 1.10095. A 20-period SMA in the same situation might move more or less, depending on what dropped out of its window.

Because recent data carries more weight, the EMA turns sooner than an SMA of the same length. That cuts some of the lag, and the cost is that it also reacts to more noise. Faster is not better or worse; it is a trade-off between early and reliable, and you cannot have both.

Common settings, and why they are common

Popular choices include the 20, 50, 100 and 200-period averages, and 9, 12 and 26-period EMAs (the latter two are used inside MACD, covered in RSI and MACD explained). These numbers are popular mainly through convention: they roughly line up with a month, a quarter or most of a trading year on a daily chart, and they have been quoted in books and media for decades.

There is nothing magic about them. Their main advantage is that many people watch them, so price reactions around, say, the 200-day average on a major pair get noticed and discussed. Any number between 150 and 250 would describe a similar long-term trend.

The danger is searching for the "best" setting by trying dozens of values on past charts. With enough attempts, something will look excellent on history and then perform far worse going forward. That is overfitting, and it is the main trap in testing indicator rules; see how to backtest a strategy.

How traders use moving averages

As a trend filter

The most common and probably least problematic use: only consider trades in the direction of a longer-term average. For example, some traders only look for long trades when price is above a rising 200-day average and only short trades when below a falling one. This does not tell you when to enter; it simply cuts out trades against the dominant direction.

As dynamic support and resistance

In established trends, price sometimes pulls back to a moving average and resumes. Traders watch averages such as the 20 or 50 EMA for this. It is the same concept as horizontal levels in support and resistance, with the same caveat: sometimes price bounces, sometimes it slices straight through.

Crossovers

A crossover signal uses two averages, one fast and one slow. When the fast crosses above the slow, it suggests upward momentum is building; when it crosses below, the opposite. The well-known 50/200 combination has nicknames in financial media ("golden cross" and "death cross"), which makes it sound more meaningful than it is.

Crossovers have a structural weakness: by the time two lagging lines cross, a good part of the move is often over. In a long, smooth trend, that does not matter much because there is plenty of trend left. In a choppy, sideways market, the averages cross back and forth, and each cross triggers a trade that quickly reverses. This is sometimes called whipsaw.

As a trailing exit

Some trend followers stay in a position until price closes beyond a moving average, letting the average act as a trailing stop. That keeps them in long moves but gives back a chunk of open gains before exiting, because the exit, like the entry, lags. See where to put a stop-loss for other approaches.

Worked example: a crossover in a trend and in a range

These are illustrative scenarios, not real price history.

Scenario A, a trending month. On a four-hour chart, a 20 EMA crosses above a 50 EMA when the pair is at 1.2500. The pair continues upward for weeks, and the 20 EMA crosses back below the 50 at 1.2900. A trader following the crossover mechanically would have captured roughly 400 pips minus costs, but would have entered perhaps 100 pips after the low and exited perhaps 150 pips below the high. That is what a crossover looks like at its best: a decent slice of a large move, never the whole thing.

Scenario B, a sideways month. The same pair now drifts between 1.2700 and 1.2800. The averages cross six times. Each signal arrives after a short swing has already happened, and price then turns back. Suppose each of those trades loses an average of 35 pips including spread. That is 210 pips lost in total, which wipes out more than half of the gain from Scenario A.

On one mini lot, where a pip on GBP/USD is worth about $1, Scenario A makes about $400 and Scenario B loses about $210. On a standard lot multiply by ten. Neither scenario tells you which kind of month is coming next. This is the central fact about trend following: the results depend on the mix of trending and ranging periods, and no one knows that mix in advance.

Also note costs. Six trades in a month means paying the spread (and commission, on raw accounts) six times, plus any overnight financing for positions held past rollover. The longer and more frequent your trades, the more these matter. See spreads and commissions and swap and overnight financing.

Why trend following can work, and why it is hard

Trend-following approaches are widely used by professional systematic funds, which is one reason they are taken seriously. The logic is that markets sometimes move persistently for long periods, and a method that stays with those moves can make up for many small losses.

That logic has demanding consequences:

  • Low hit rate. Trend approaches typically have many more losing trades than winning ones, with the winners needing to be much larger. Psychologically, that is hard: long runs of small losses lead many traders to abandon the method just before a big trend arrives. See trading psychology.
  • Strict sizing. Because losing streaks are long, risk per trade has to be small enough to survive them. Ten losses in a row at 5% risk is a 40% drawdown; at 1% it is under 10%. The method is in position sizing.
  • Expectancy, not accuracy. Whether a low win rate works depends on the size of wins relative to losses. The arithmetic is in risk-reward ratio.
  • Diversification. Professional trend followers often spread risk across many markets so that a trend somewhere can offset ranges elsewhere. A retail trader in two or three currency pairs has far less of that cushion.
  • Regime changes. Trends that worked for years can stop working when the economic backdrop changes.

None of this means trend following is good or bad. It means the method is a set of trade-offs that need to be understood and tested before being trusted with real money. Most retail CFD accounts lose money, and leverage magnifies losses; a moving average does not change that.

Moving averages and the economic backdrop

It helps to remember why currency trends happen. Sustained moves in major pairs are often linked to shifts in relative interest rates, growth and inflation. A moving average describes the move; the fundamentals often explain it. A sudden central bank surprise or major data release can end a trend in a day, long before any average catches up. Keep an eye on the economic calendar and on how economic data moves forex.

Common mistakes

  • Treating a crossover as a prediction. It is a description of the past few weeks, nothing more.
  • Using moving averages in ranges. In sideways markets, averages flatten and price crosses them constantly. A flat long-term average is a warning that trend tools may not help.
  • Stacking many averages. Five moving averages on one chart look sophisticated but mostly repeat the same information.
  • Optimising the settings to history. The best-looking setting on past data is usually the one that fits past noise best.
  • Ignoring costs. More signals mean more spread paid. A system that looks fine before costs can be negative after them.
  • Giving up the risk rules after a losing streak, or increasing size to "win it back". Both are well documented routes to large losses; see why most retail CFD traders lose.
  • Forgetting timeframe. A 50-period average on a five-minute chart covers a little over four hours; on a daily chart, ten weeks. Those are completely different trends.

Testing before trusting

If you want to use a moving-average rule, write it down precisely: which averages, which timeframe, what triggers entry, where the stop goes, what triggers exit, and how much you risk. Then test it on historical data across different market conditions, including costs, and forward test it on a demo account. Record the results in a trading journal. The point is not to find a perfect setting, it is to understand how the rule behaves: how long the losing streaks are, how big the drawdowns get, and whether you could actually live with them.

Frequently asked questions

What is the difference between an SMA and an EMA?

An SMA gives equal weight to every price in its window. An EMA gives more weight to recent prices, so it turns sooner. The EMA is more responsive but also more prone to false signals; the SMA is smoother but slower.

Which moving average is best for forex?

None is best in general. The 20, 50 and 200-period averages are popular because many people watch them, not because they are optimal. The right choice depends on the timeframe you trade and how long you hold positions, and it should be tested rather than picked from a chart.

Do moving average crossovers work?

They tend to capture part of large trends and lose repeatedly in sideways markets. Whether the total is positive depends on the market, the period and costs. Many crossover rules that look good on past charts do worse when traded live.

What does the 200-day moving average tell you?

It shows the average closing price over roughly the last 200 trading days, a broad measure of the long-term trend. Price above a rising 200-day average is commonly read as a long-term uptrend. It says nothing about what happens next.

Why do moving averages lag?

Because they are averages of past prices. Any smoothing requires looking back, and the longer the window, the smoother the line and the greater the lag. That is the unavoidable trade-off at the heart of every trend indicator.

Can I combine moving averages with other indicators?

Yes, and many traders do, for example using a moving average as a trend filter with RSI for timing. Be aware that many indicators are built from the same price data, so they often agree for the same reason rather than providing independent confirmation.

Not investment advice. This is general information and education, written without knowledge of your circumstances. It is not a recommendation to buy or sell any instrument. Past performance is not a reliable indicator of future results. Trading leveraged products carries a high risk of losing money. Risk warning