Moving Average Crossover Strategy in Forex: Rules, Filters and Failure Modes
A moving average crossover strategy buys when a faster moving average crosses above a slower one and sells when it crosses below, on the idea that the cross marks the start of a new trend. It is simple, fully objective and easy to test, which is why it is often the first system traders build. On its own it loses repeatedly in sideways markets and enters trends late, so a usable version needs a trend filter, a sensible stop, and realistic expectations about a low win rate.
Key takeaways
- A crossover is a lagging signal: by the time the averages cross, part of the move has already happened.
- Popular pairs include 9/21 EMA for intraday, 20/50 for swing trading and 50/200 (the "golden cross" and "death cross") for long-term bias.
- Crossover systems typically win a minority of trades and depend on a few large trends to pay for many small losses.
- A filter such as ADX, the 200-period average or a higher-timeframe trend removes many of the false signals in ranging markets.
- Stops based on ATR or recent swing points work better than waiting for the opposite cross, which can give back a large share of profits.
How a moving average crossover works
A moving average smooths price by averaging the closing prices over a set number of periods. A 20-period average on a daily chart is the mean of the last 20 daily closes. A shorter average reacts faster to price changes; a longer one reacts slower.
When price starts trending up, the fast average turns up first and eventually crosses above the slow average. That cross is the buy signal. The reverse is the sell signal. In a sustained trend, the fast average stays on the trend side of the slow one and the position is held. When the trend ends, the averages eventually cross back and the position is closed or reversed.
The appeal is that there is nothing to interpret. Either the averages have crossed on a closed candle or they have not. That makes the method ideal for backtesting and for automating in an expert advisor or trading bot, and it removes a lot of in-the-moment hesitation.
Why it lags
Every moving average is built from past prices, so every crossover confirms a move that is already under way. On a 50/200 daily cross, the signal can come months after the actual turning point. This lag is not a flaw to be fixed; it is the price you pay for filtering out noise. Shorter averages lag less but produce more false signals. There is no setting that removes the trade-off.
EMA or SMA for crossovers?
A simple moving average (SMA) weights every period equally. An exponential moving average (EMA) gives more weight to recent prices, so it turns faster. For crossovers, EMAs produce earlier signals and also more whipsaws; SMAs produce later, somewhat cleaner signals. Neither is objectively better. Our EMA vs SMA comparison walks through the formulas and shows how far apart they can sit on the same chart.
A practical approach: pick one type and keep it consistent through testing. Switching between EMA and SMA after a run of losses is a common way to curve-fit a system to the recent past.
Common crossover settings and what they suit
| Fast / slow | Typical timeframe | Character | Main weakness |
|---|---|---|---|
| 5 / 13 EMA | 5-minute to 15-minute | Very responsive, many signals | Heavy whipsaw; spread cost eats small moves |
| 9 / 21 EMA | 15-minute to 1-hour | Common intraday trend tool | Fails in Asian-session ranges |
| 20 / 50 EMA or SMA | 4-hour to daily | Swing trading; fewer, larger signals | Late entries after sharp reversals |
| 50 / 200 SMA | Daily | Long-term bias; "golden" and "death" cross | Very late; few signals per year |
| Price / 200 EMA | Any | Used as a filter more than a signal | Price oscillates around it in ranges |
The settings themselves are conventions, not magic numbers. The reason 50 and 200 are popular is partly that so many traders watch them, which can make reactions around them slightly more pronounced, but there is no evidence that 50/200 is inherently better than, say, 40/180.
The basic rules, written out
Here is a complete, testable version using the 20/50 EMA on the 4-hour chart. It is an example for learning, not a recommendation.
- Long signal: the 20 EMA closes above the 50 EMA on a completed 4-hour candle.
- Short signal: the 20 EMA closes below the 50 EMA.
- Entry: at the open of the next candle.
- Stop: 2 x the 14-period ATR from entry.
- Exit: either a fixed target at 3 x ATR, or a trailing stop of 2 x ATR that only tightens.
- Risk: 1% of account per trade.
Written this way, the system can be tested on years of data in minutes. Most people who test the raw version discover the same thing: in trending years it does fine, and in choppy years it bleeds through dozens of small losses. That leads to filters.
Filters that cut down false signals
The single biggest problem with crossovers is the range. When price moves sideways, the averages flatten and cross back and forth, each cross producing a losing trade. Filters try to identify when the market is trending so you only take signals then.
Higher-timeframe trend filter
Only take long crossovers when price is above the 200 EMA on the daily chart, and only shorts when it is below. This aligns intraday signals with the bigger trend. The 200 EMA strategy page covers this filter in detail.
ADX filter
The Average Directional Index measures trend strength without direction. A common rule is to ignore crossovers when ADX(14) is below 20 or 25. It is not precise, but it removes many signals during flat periods. See the ADX guide for how the reading is built.
Slope or separation filter
Require the slow average to be sloping in the signal direction, or require the gap between averages to exceed a fraction of ATR within a few candles of the cross. Both rules aim at the same thing: only trading crosses that turn into actual separation.
Session filter
For intraday crossovers, ignore signals during the quietest hours (often late New York into early Asia for EUR and GBP pairs). Many false crosses occur when volume is thin.
Each filter you add removes losing trades and also some winners. Add one at a time, test it, and keep it only if it improves results across different periods and pairs, not just the one you started with.
Worked example with real numbers
Account: $8,000. Risk per trade: 1%, so $80. Pair: GBP/USD on the 4-hour chart. The 20 EMA closes above the 50 EMA, and price is above the daily 200 EMA, so the filtered long signal is valid. Next candle opens at 1.2640. The 14-period ATR is 32 pips.
- Stop at 2 x ATR = 64 pips, so 1.2576.
- Target at 3 x ATR = 96 pips, so 1.2736.
- Pip value on GBP/USD for a USD account: $10 per standard lot.
- Position size = $80 / (64 x $10) = 0.125 lots, rounded down to 0.12 lots.
- If the stop hits: about 64 x $1.20 = $76.80 loss, plus spread and commission.
- If the target hits: about 96 x $1.20 = $115.20 gain.
Reward to risk is 1.5:1, so the system needs to win more than 40% of trades (before costs) to break even. Costs push that threshold up a little. If testing shows a 35% win rate, the fixed target is too close for this system and a trailing exit may suit it better. The risk to reward calculator shows the break-even win rate for any ratio.
Exits: the part that decides results
Most crossover traders spend their time on entry settings, but exits do more to decide whether the system works. There are three main choices.
- Opposite crossover: exit when the averages cross back. This keeps you in long trends but gives back a large share of profit at each turn because of the lag. It also means the stop is undefined until the cross happens, which is unacceptable without a separate protective stop.
- Fixed target: clean and simple, but caps the occasional big trend that the method relies on.
- Trailing stop: an ATR-based or swing-low trailing stop tends to suit crossover systems because it lets winners run while limiting give-back. See trailing stops explained for the mechanics.
Many traders use a hybrid: close half at 1.5R or 2R and trail the rest. That smooths the equity curve at the cost of some upside.
Where crossovers fit in a broader plan
Many experienced traders do not use crossovers as entry signals at all. Instead they use them as a regime filter: the 50/200 relationship on the daily chart decides whether they look for longs or shorts, and a separate method (price action, pullbacks, breakouts) times the entry. This keeps the strength of moving averages, which is identifying the trend, and drops their weakness, which is late timing.
If you want to compare the crossover approach with other ways of using averages and oscillators, the indicator combinations guide shows which tools complement each other and which just duplicate the same information.
Testing is not optional. Run the rules over at least several hundred trades of history across more than one pair, record the maximum consecutive losses and maximum drawdown, and then run them forward on a demo for a few months. If the live results look nothing like the backtest, the backtest was probably overfitted.
Frequently asked questions
What is the best moving average crossover for forex?
There is no single best setting. The 9/21 EMA is common for intraday charts, 20/50 for swing trading and 50/200 SMA for long-term trend bias. What matters more is testing your chosen pair of averages across several years and pairs, adding a trend filter for ranging markets, and using a stop and exit rule suited to the timeframe.
Does the moving average crossover strategy actually work?
It can produce positive results in strongly trending periods, but it loses in ranging markets, and over long samples many raw versions roughly break even or lose after costs. Filters and good exits improve it. It is best seen as a trend-identification tool rather than a complete edge, and any version should be tested with realistic spreads before real money is used.
What is a golden cross in forex?
A golden cross is when the 50-period moving average crosses above the 200-period average, usually on the daily chart. It is read as a shift to a long-term uptrend. The opposite, the 50 crossing below the 200, is called a death cross. Both signals are very late, so they are better used as a directional filter than as a timing signal.
Should I exit when the moving averages cross back?
You can, but it often gives back a large share of the profit because the averages lag. You also need a separate protective stop, since the opposite cross could be hundreds of pips away. Many traders prefer an ATR-based trailing stop or a partial exit at a fixed multiple of risk, combined with a trailing stop on the remainder.
How do I avoid false crossover signals?
Add a filter that identifies trending conditions. Common choices include only trading in the direction of the daily 200 EMA, requiring ADX above 20 or 25, requiring the slow average to slope in the signal direction, and avoiding very quiet trading hours. Each filter removes some winners as well as losers, so test them one at a time.
Can I automate a moving average crossover strategy?
Yes. Crossovers are among the easiest strategies to code as an expert advisor in MT4 or MT5, a cBot in cTrader, or a script using a broker API. Automation removes hesitation but not risk. Backtest with realistic spreads and slippage, forward-test on demo, and be wary of optimising settings so tightly that they only fit past data.
This article is general information, not personal financial advice. Figures such as spreads, fees, leverage and rules change; confirm them with the provider and check the provider is authorised for your country of residence.