Moving Average Crossover Strategy

On this page I'd like to take you through a comparison of a couple of moving average crossover systems. One uses two simple moving averages (sma's) and the other uses three sma's.

Ever thought about using a dual moving average system to trade?

If you're considering using dual moving average crossovers to both enter and exit trades, you might consider testing a triple MA system too. Compare them side by side on different stocks or other trading instruments as well as different time periods or time frames. Test different moving average periods, but be careful not to rely on optimized or 'curve-fitting' results.

But since some of my visitors don't know what this is, lets go over some basics first.

WHAT'S A MOVING AVERAGE CROSSOVER?

Example of Moving Average Crossover

The image on the right is an example of a dual moving average crossover, that would initiate a buy signal (bullish crossover). A faster moving average (8 sma - blue) crosses above a slower average (13 sma - yellow).

Notice that the signal is not confirmed until the close of the bar. This means the actual entry (in live trading) would be somewhere within the next bar. Most likely near the open of that bar.

If you haven't done any backtesting yet, this kind of simple system will probably be one of the first that you'll test, since it requires very little programming skills. Anyway, if you go down this path, you'll find that the opening price of the next bar after the cross, is where backtesting software (depending on the setting) will place the simulated trades. Which is reasonable, because if you were actually trading using automated trading software, this is a close approximation of where your trade would take place.

With a typical 'stop & reverse' system, this long entry would not be exited until the blue, faster MA crossed below the yellow, slower MA. This MA bearish crossover not only exits the trade, but initiates a short trade in the opposite direction as well. So, with dual moving average crossover systems, the trader is always in a trade, long or short.

Lets take a look at an intraday example over the course of one day.

DUAL MOVING AVERAGE CROSSOVER

We'll use a 5 minute chart of SPY with two simple moving averages for the first example: Fast = (8 sma - green) and Slow = (13 sma - yellow).

I chose this particular day, because I wanted to illustrate what is very typical for practically any moving average crossover strategy. The first long trade after 11:00am goes very well and actually catches a good pullback entry.

The exit at around 12:45pm is profitable.

But, want I'd like you to observe is the choppy price action between 12:00 - 3:00. This is where double MA systems can really grind your profits down. The MA's just whipsaw back and forth causing three losses in a row, probably evaporating the profits from the first trade. If a person was trading this method on this day, fortunately they would've seen one more decent winning trade at 2:30.

The good part of this system is displayed on the first trade and the last trade. While moving average crossovers fail miserably during choppy price action, they work very well during trending price action.

If you backtest these simple stop and reverse systems, and inspect one that comes out with a profit, you'll most likely find that the win% is less than 50%, but the average winner will be larger than the average loser.

That's because moving average crossover systems are essentially 'trend trading' systems. And, trend trading systems almost always have this characteristic of a small percentage of winners and a good ave.win to ave.loss ratio.

In the charts below L = Long, S = Short and Ex = Exit.

Chart of SPY with two moving averages

TRIPLE MOVING AVERAGE CROSSOVER

So far the discussion has centered around a stop & reverse type system, whereby a signal for an exit, also produces a trade in the opposite direction. But if we introduce a third moving average to the system, there can be a period of neutrality. In other words, no trade takes place -- you're in cash.

For this example, we're going to use a 3 minute chart and three simple moving averages: 4 sma, 10 sma and 50 sma.

The rules are very simple. If the slow line (50 sma) is rising, and the fast line (4 sma) crosses above the middle line (10 sma), there is a buy signal. The exit signal comes when the fast line crosses below the middle line.

The rules are the opposite for short entries. It's easy to see, that this system is similar to taking trades off the trend of a higher time frame.

An alternative to this system, would be to only take long entries, when both the fast and middle moving averages are above the slow sma.

Be aware that when your dealing with three degrees of freedom (3 variables), rather than two as in the above example, you are making the system more complex and therefore creating many more possible combinations to test.

Of course, backtesting software makes this a snap, but remember that adding filters and complexity doesn't always make a better system. Frequently, a simpler system can be more robust under testing.

An example is below.

Stock chart showing Moving Average Crossover System

If you're interested in moving averages, you might also want to check out my page on how to use moving averages as a trailing stop.