Skip to content
All library documents

ATR Trailing Stops with an SMA Trend Filter

Article Strategy library · Author: ChaoZhang

Summary

This document describes a long-only trend strategy that enters when the close is above a 50-period simple moving average. It calculates a trailing stop from the 10-period average true range multiplied by a sensitivity factor, with a default factor of 3. The stop ratchets upward as price rises and the stated exit condition is a close below the trailing level.

The text explains how the ATR distance adapts to recent volatility and presents the stop as a way to protect gains during trends. It warns that sideways markets can produce frequent trades and costs, that the long-only design cannot benefit from downtrends, and that a wide ATR stop can leave substantial exposure. It recommends considering short logic, position controls, a maximum stop distance, and parameter checks.

The supplied script complicates the description: it includes separate percentage-based trailing exits for positions, while the ATR stop is plotted as a visualization and does not appear to drive those exits. No performance results are reported, so the claimed benefits are not demonstrated by a backtest here.

Key ideas

  • A close above the 50-period SMA is described as the condition for opening a long position.
  • The trailing level uses ATR multiplied by a sensitivity factor to scale its distance with volatility.
  • The described long exit occurs when price closes below the trailing stop.
  • Sideways markets can trigger repeated entries and exits, increasing trading costs.
  • The source script's execution exits appear distinct from its ATR-based visualization.

Tags

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