Strategy

The Moving Average Crossover Strategy, Tested

The moving average crossover is the first system almost every trader tries - and the first one they blame. It is not a money printer, but it is the perfect strategy to learn honest backtesting on, because the rules are so mechanical you cannot cheat them.

The moving average crossover strategy buys when a faster moving average crosses above a slower one and sells when it crosses below. A classic pairing is the 50 and 200 period. Its rules are fully objective and need no interpretation, which makes it the ideal first strategy to learn and backtest - and a clean lesson in why simple does not mean profitable.

The rules

  • Setup: two moving averages - a fast one (say 50) and a slow one (say 200).
  • Buy: the fast MA crosses above the slow MA (the "golden cross").
  • Sell: the fast MA crosses below the slow MA (the "death cross").
  • Stop and exit: a fixed stop, a structure stop, or exit on the opposite cross - decided in advance.

That is the whole system. No judgment, no "it looked strong" - which is exactly why it is worth studying even if you never trade it live.

Its strength and its fatal flaw

Because it only flips direction after the averages cross, the crossover keeps you on the right side of big trends and rides them for a long time. But the same lag that catches trends destroys it in ranges: when price chops sideways, the averages cross back and forth, handing you a string of small whipsaw losses. This is the textbook case of a strategy whose edge is entirely condition-dependent.

Great in trends, bled in rangesthe crossover's whole story
Trending market
+0.40R
Ranging market
-0.22R
Blended
+0.04R

A trend filter that keeps it out of ranges usually does more for the crossover than any change to the periods.

The tuning trap

The moment beginners see the whipsaws, they start hunting for "the best" moving average settings. This is a trap. Optimizing the two periods until the backtest looks perfect is textbook curve fitting - the numbers that fit last year's chart usually fail on next year's. A crossover that works reasonably across many settings and pairs is worth more than one that was tortured into looking flawless on a single sample.

Important: the value of the crossover is not the strategy itself - it is what it teaches. Fixed rules, a clear equity curve, an obvious weakness, and a strong temptation to over-optimize make it the best possible sandbox for learning how backtesting can help you and how it can fool you.

Test it the right way

Fix the periods, the stop, and the exit before you start, then replay the data and take every cross - winners and whipsaws alike. In a simulator you can watch the equity curve climb through the 2020 trend and grind sideways through a range, then add a simple trend filter and re-test to see how much it actually helps. That loop - one fixed change, measured - is the whole point.

Moving average crossover FAQ

What is the moving average crossover strategy?

A mechanical trend system that buys when a fast MA crosses above a slow one and sells when it crosses below, commonly using the 50 and 200 periods.

Does it actually work?

It captures big trends but whipsaws badly in ranges. On its own it is a weak lower-timeframe edge, but as a filter or on higher timeframes it can help - test it.

How do I backtest it?

Fix the periods, entry, stop, and exit, then take every cross across trending and ranging periods - without tuning the settings until the past looks perfect.

Risk disclaimerTrading foreign exchange, CFDs, and other leveraged products carries a high level of risk and is not suitable for every investor — losses can exceed your deposits. Everything on this page is educational content, not financial advice. Backtest and simulator results are hypothetical: they do not represent live trading and past performance does not guarantee future results.