Skip to content
All library documents

Combining 2/20 EMA Signals with ATR Trailing Stops

Article Strategy library · Author: ChaoZhang

Summary

This strategy combines a price and EMA state signal with an ATR-based trailing stop state. The document describes the EMA component as a 2/20 method, while the supplied code uses a configurable EMA length and a state calculation based on recent highs, lows, and the EMA. The ATR component sets a trailing level using a configurable ATR period and multiplier; the stated default multiplier is 3.5. The code enters long or short when both component states agree, closes positions when neither combined direction applies, and includes an option to reverse trades.

The document frames the combination as trend following plus reversal detection, and discusses parameter sensitivity, whipsaws, and overtrading. Published backtest settings specify BTC/USDT futures over a stated period, but no performance statistics are supplied. The text's description of opposing indicator signals conflicts with the code, which requires both calculated states to agree. Therefore the implementation and its actual behavior should be checked before drawing conclusions from the conceptual explanation or backtest setup.

Key ideas

  • The strategy combines an EMA-based state with an ATR trailing-stop state.
  • The code opens positions when both component states agree on direction.
  • The ATR trailing level uses a configurable period and multiplier, with 3.5 stated as the default multiplier.
  • A reverse-trading option can invert the combined signal.
  • Published BTC/USDT futures settings provide no reported performance results, and the prose signal rule conflicts with the code.

Tags

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