Skip to content
All library documents

ATR Expansion and Momentum Entries with Delayed Exit Orders

Article TradingView scripts

Summary

The strategy combines an ATR expansion filter with a 20-bar price momentum check. It enters long when price is above its level 20 bars earlier, or short when below, provided current ATR exceeds half its 20-period average and is not below that average. The script sets stop and target levels using current ATR, with a nominal one-to-two risk/reward distance, and specifies commission and slippage assumptions.

The description presents a 42-bar maximum holding period, but the code only enables its stop and limit exit orders once a position has already lasted at least 42 bars. It therefore does not implement the described immediate forced close at that point, and the ATR-based levels may change as ATR changes. No performance results are supplied, so the rules are a research example rather than evidence of an effective strategy.

Key ideas

  • ATR relative to its moving average is used to identify volatility expansion and filter entries.
  • Direction is determined by whether the close is above or below its value 20 bars earlier.
  • Stop and target distances are based on ATR, with a stated two-to-one target-to-risk multiple.
  • The code gates exit orders until 42 bars have elapsed, which differs from the prose description of a forced time exit.

Tags

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