Skip to content
All library documents

Measuring Trend Persistence with Moving Averages and ATR Risk Controls

Article Strategy library · Author: PinegenAI

Summary

This framework evaluates how long a directional trend remains intact rather than reacting to each change in direction. It defines direction using fast and slow exponential moving averages, then counts consecutive bars with the fast average above or below the slow average. Long or short entries become eligible after the relevant state lasts for a minimum duration. ATR-based stop and target levels scale with current volatility, using a configurable stop multiple and risk-reward setting.

Key ideas

  • Trend direction is defined by the ordering of fast and slow exponential moving averages.
  • A counter measures consecutive bars in each trend state, and entries require a minimum duration.
  • Stops and profit targets are based on ATR and the average entry price.
  • The persistence filter may reduce reactions to short-lived direction changes but can delay entries.
  • The source provides strategy logic and parameter defaults, but the displayed overview is truncated and reports no backtest performance.

Tags

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