Trend following

EMA Crossover

A simple, robust trend system built on two moving averages.

The EMA crossover is the 'hello world' of trend systems: when a fast EMA crosses a slow EMA, the trend is assumed to have shifted. Simple, transparent and easy to backtest, but it whipsaws in ranges, so filtering matters.

How it works

A fast EMA reacts quickly to price; a slow one is steadier. Their crossover marks a momentum change. The 50/200 cross (the 'golden cross' and 'death cross') is the most watched. Adding a trend or volatility filter reduces false signals in choppy markets.

Entry rules

  • ▸Go long when the fast EMA crosses above the slow EMA.
  • ▸Go short on the opposite cross.
  • ▸Optionally only trade crossovers aligned with a higher-timeframe trend.

Exit & risk

  • ▸Exit on the opposite crossover.
  • ▸Use an ATR-based stop to cap risk on false signals.
  • ▸Trail the slow EMA to ride strong trends.

Best for

Trending instruments and higher timeframes. In sideways markets, crossovers whipsaw, a filter or a minimum-separation rule helps.

Build this strategy in Algovex

Every component of this strategy is a node in Algovex — drop them on the canvas, connect the logic, backtest on a real engine, and export to code. No programming required.

Key terms

Frequently asked questions

What is the golden cross?

The golden cross is when the 50-period moving average crosses above the 200-period, a widely watched bullish signal. The opposite (50 below 200) is the death cross. Both are EMA/SMA crossover signals you can backtest in Algovex.