Futures, CFDs and spread bets are high risk; most retail traders lose money. Education only, not advice. Risk warning

Moving Average Crossover Strategy

At a glance
Status Education only. Hypothetical example, not a recommendation.
Difficulty Beginner
Markets Trending, liquid markets – major indices, major forex pairs, gold
Timeframe 4-hour chart (daily for a slower version)
Time needed A few minutes, two or three times a day (4-hour) or once a day (daily)
Style Trend following – few trades, held for days or weeks
Main risk “Whipsaws” – repeated false crosses in ranging markets
Course module Module 6: Trends and Market Structure

A moving average crossover is often the first rules-based strategy people learn, and for good reason. It’s fully objective – two lines either cross or they don’t – so it’s easy to backtest and hard to second-guess. It’s also a great way to learn the strengths and weaknesses of trend-following.

The idea behind the strategy

A moving average (MA) smooths out price by averaging the last n candles. A short MA (e.g. 20 periods) reacts quickly. A long MA (e.g. 50 periods) reacts slowly.

  • When the fast MA crosses above the slow MA, recent prices are rising faster than the longer-term average – a possible sign an uptrend is starting.
  • When the fast MA crosses below the slow MA, a downtrend may be starting.

The best-known version is the “golden cross” (50-day MA crossing above the 200-day MA) and the “death cross” (crossing below). These are slow signals on daily charts and are mostly used as a broad market gauge.

The catch: moving averages are built from past prices, so crossovers always lag. You’ll never buy the bottom or sell the top. In sideways markets, the averages cross back and forth, producing a string of small losses. Trend-following strategies typically lose on more trades than they win and rely on occasional larger winners. You need the discipline to keep taking signals through the losing runs.

Simple (SMA) or exponential (EMA)?

  • SMA weights every candle equally.
  • EMA gives more weight to recent candles, so it reacts faster.

This page uses EMAs for the crossover and an SMA as a trend filter. Neither is “better” – pick one setup and test it consistently.

The rules (a complete beginner version)

These are example rules for learning and backtesting.

1. Chart setup

  • 4-hour chart.
  • Add a 20 EMA (fast), a 50 EMA (slow) and a 200 SMA (trend filter).
  • Add the 14-period ATR (Average True Range) for stop placement.

2. Trend filter

  • Long trades only when price is above the 200 SMA.
  • Short trades only when price is below the 200 SMA. This one filter removes many counter-trend signals.

3. Entry signal

  • Long: the 20 EMA crosses above the 50 EMA, and the candle closes above both. Enter at the open of the next candle.
  • Short: the 20 EMA crosses below the 50 EMA, and the candle closes below both. Enter at the open of the next candle.
  • Ignore a signal if price is already more than 2× ATR away from the 50 EMA when the cross happens (you’d be entering late, with a wide stop).

4. Stop-loss

  • Long: below the most recent swing low, or 1.5× ATR below entry – whichever is further away (so normal noise doesn’t stop you out).
  • Short: mirror the rule above the most recent swing high.

5. Exit

Choose one exit method for testing: – Exit A – opposite cross: close when the 20 EMA crosses back over the 50 EMA. Simple and objective, but you give back some profit at the end of every trend. – Exit B – fixed target plus trail: take half off at 2R, move the stop to break-even, and exit the rest on the opposite cross.

6. Trade limits

  • One position per market at a time.
  • Don’t re-enter in the same direction until a new crossover happens.

Worked example (hypothetical)

All prices are made up for teaching.

Setup: Demo account £10,000, risk 1% (£100). GBP/USD spread bet, 4-hour chart. Exit A (opposite cross).

  1. Filter: price is trading above the 200 SMA – longs only.
  2. Signal: the 20 EMA crosses above the 50 EMA. The signal candle closes at 1.2848, above both EMAs.
  3. Entry: next candle opens at 1.2850.
  4. Stop: recent swing low is 1.2790 (60 pips away). 1.5× ATR (ATR = 28 pips) = 42 pips. Use the further one: 1.2790, so 60 pips of risk.
  5. Position size: £100 ÷ 60 = £1.66 per pip. Round down to £1.50 per pip. Actual risk = £90.

Outcome A – trend develops: over the next three weeks price climbs. The 20 EMA finally crosses back below the 50 EMA, and you exit at 1.3010. Profit = 160 pips × £1.50 = +£240 (+2.7R).

Outcome B – whipsaw: price stalls. Two days later the EMAs cross back down, and you exit at 1.2830. Loss = 20 pips × £1.50 = −£30 (−0.3R). Small, but these add up in ranging markets.

Outcome C – sharp reversal: price drops quickly and hits the stop at 1.2790 before the averages cross back. Loss = −£90 (−1R).

A typical run of trend-following trades might include several B and C outcomes for every A. That’s why position size and patience matter so much.

Risk management

Stake per pip (or point) = (account × risk %) ÷ stop distance

  • Risk 0.5–1% per trade (The 1% rule).
  • Expect losing streaks. Track your longest losing run in testing and make sure you could survive twice that at your chosen risk.
  • Diversify carefully. Running the strategy on several markets can smooth results, but correlated markets (e.g. FTSE 100, DAX and S&P 500) often signal together. That multiplies your risk (Correlation risk).
  • Overnight costs and gaps. Trades last days or weeks. Include financing costs in your backtest, and consider weekend gap risk (Gaps and overnight risk).
  • Never widen the stop once in a trade.

Using it in a prop firm challenge

What fits well: – Objective rules mean fewer emotional decisions. – Low trade frequency limits overtrading.

What to watch: – Losing streaks vs maximum drawdown. A run of whipsaws during a sideways month can push you close to a drawdown limit. Many traders use smaller risk (e.g. 0.5%) in challenges. – Time limits and minimum days. Trend signals don’t come on demand. If a firm has a time limit, this strategy may not produce enough signals. Don’t drop to a lower timeframe just to force trades without testing it. – Holding rules. Positions held overnight, over weekends or through news may break some firms’ rules. – Trailing drawdown. Giving back open profit at the end of a trend (Exit A) can tighten a trailing drawdown limit. See Trailing vs static drawdown.

Check holding and drawdown rules on our prop firm comparison and run the numbers in the True Cost Calculator before paying for any challenge.

Common mistakes

  1. Trading crossovers in sideways markets. If the averages are flat and tangled, there’s no trend to follow. The 200 SMA filter helps, but also look at the chart.
  2. Tweaking the settings after every loss. Switching from 20/50 to 10/30 to 9/21 because of recent results is curve-fitting. Pick one setup and test it properly.
  3. Entering late. Chasing a signal that happened days ago gives you a worse price and a wider stop.
  4. Cutting winners short. This strategy relies on occasional big trends. Taking profit at +1R every time removes the winners that pay for the whipsaws.
  5. Using too many indicators. Adding RSI, MACD and Stochastic “for confirmation” usually just delays entries and adds confusion.
  6. Stopping after a few losses. The losses are the cost of the strategy. Judge it over 100+ trades, not five.

How to backtest it

Crossovers are ideal for a first backtest because the rules involve almost no judgement.

  1. Pick one market and timeframe. Go back at least two to three years on the 4-hour chart – trend strategies need long samples to include trending and ranging periods.
  2. Use bar replay and record every signal exactly as the rules say, including the ugly ones.
  3. Log: date, direction, entry, stop, exit, exit reason, R result, days held, estimated financing cost.
  4. Aim for 100+ trades. On a 4-hour chart on one market, that may take several years of data, which is one reason to test a few uncorrelated markets.
  5. Track: win rate, average win (R), average loss (R), expectancy, and the longest losing streak.
  6. Compare Exit A vs Exit B as separate tests.
  7. Beware curve-fitting. If you test lots of MA combinations, the “best” one on past data is likely to look worse on new data. Read Avoiding curve-fitting.

TradingView’s strategy tester can automate simple crossover tests. Treat the results with care: check the cost settings (spread, commission) and remember past results don’t predict future performance. Then forward test on demo for at least 60 days (Demo trading).

FAQ

What’s the best moving average crossover? There isn’t one. 20/50, 50/200 and 9/21 are all commonly used. What matters is testing one setup thoroughly and sticking to it.

What is a golden cross? When the 50-day moving average crosses above the 200-day moving average. It’s a slow, widely watched signal often used to describe a market’s longer-term trend.

Why do I keep getting stopped out with crossovers? Probably because the market is ranging. Crossover strategies produce whipsaws in sideways markets. A trend filter helps, but losing streaks are part of the strategy.

EMA or SMA – which is better for crossovers? EMAs react faster and give earlier signals but more false ones. SMAs are slower and smoother. Test both, but don’t switch back and forth.

Is this strategy profitable? We don’t make performance claims. Results depend on the market, period, costs and your discipline, and most retail traders lose money. Test it yourself.

Related pages


Disclaimer: This page is general education, not financial or investment advice or a personal recommendation, and it doesn’t take your circumstances into account. Examples are hypothetical, for illustration only, and not an invitation to buy or sell. No strategy works all the time, and every strategy has losing runs. Learning a strategy doesn’t guarantee profits. Past performance is not a reliable guide to future results. Futures, spread bets and CFDs are complex and carry a high risk of losing money quickly because of leverage, and most retail traders lose money. With a real futures account, losses can exceed your deposit. Only trade with money you can afford to lose, and speak to an independent FCA-authorised adviser if you’re unsure. The rules are an example for learning and testing, and the worked example is hypothetical. No performance is implied or promised. Read our full risk warning.