Moving Average Crossover

BeginnerAny timeframeAlgorithmic

Strategy Overview

Systematic trading using moving average crossovers for signals.

How It Works

The moving average crossover is one of the most popular algorithmic trading strategies due to its simplicity and effectiveness in trending markets. It uses two moving averages of different periods—when the faster MA crosses above the slower MA, it generates a buy signal (golden cross), and vice versa for sells (death cross). This strategy can be fully automated and works across all markets and timeframes. The key is optimizing the periods for your specific market and adding filters to reduce whipsaws.

Setup Rules

  1. 1Define fast MA period (e.g., 50)
  2. 2Define slow MA period (e.g., 200)
  3. 3Choose MA type (SMA, EMA, WMA)
  4. 4Set position sizing rules
  5. 5Add trend filter for confirmation

Entry Rules

  • Long when fast MA crosses above slow MA
  • Short when fast MA crosses below slow MA
  • Confirm with volume or momentum
  • Can require close above/below MAs

Exit Rules

  • Exit on opposite crossover
  • Or use trailing stop
  • Time-based exits optional
  • Can scale out partially

Risk Management

  • Fixed percentage position sizing
  • Maximum 2% risk per trade
  • Correlation limits for portfolio
  • Drawdown limits trigger halt

Advantages & Disadvantages

Advantages

  • Simple to understand and code
  • Works in trending markets
  • Emotionless execution
  • Can be fully automated

Disadvantages

  • Whipsaws in ranging markets
  • Lagging indicator system
  • Many false signals
  • Requires trending conditions

Best Market Conditions

Strong trending markets with sustained moves

Required Indicators & Tools