Skip to content
All library documents

Moving Average Crossovers with ATR-Based Stops and Targets

Article Strategy library · Author: ChaoZhang

Summary

This crossover strategy uses a configurable fast and slow moving average to trade in both directions. When the fast average crosses above the slow average, it opens a long position; a cross back below closes that position. The reverse crossover opens a short, which is closed when the averages cross in the opposite direction. The implementation offers several average types and price sources, with example periods of 26 and 51.

ATR sets stop-loss and take-profit distances through separate multipliers, and an input selects the analysis start year. The document explains that averages smooth price noise but can produce whipsaws and perform poorly in ranging markets. It recommends testing parameters and adding filters, yet provides no performance evidence for the general claims. Although it cites an 83% win rate for an EMA combination on EUR/CHF daily data, the stated backtest setup elsewhere uses BTC/USDT futures over a brief interval and does not report results. The quoted win rate should therefore be treated as an unsupported example rather than validation of this implementation.

Key ideas

  • Fast and slow moving averages generate long and short entries through crossovers.
  • The example defaults to periods of 26 and 51 and allows multiple average types and price sources.
  • ATR-based stop and target distances are controlled by separate multipliers.
  • Whipsaws and ranging markets are identified as key weaknesses.
  • The cited win-rate example is not supported by results from the published backtest setup.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.