Skip to content
All library documents

Smart NR2-NR20: Trend-Filtered Narrow-Range Breakouts with Adaptive Lookback

Article ProRealCode

Summary

Smart NR2-NR20 identifies a two-candle contraction whose total range is smaller than the ranges of recent 20-candle blocks across a comparison window. It arms a pattern only at the start of a run of qualifying setups and draws a box using the high and low of that candle and the previous setup candle. The first break of the box sets direction. A trend filter accepts bullish breaks above a moving average and bearish breaks below it; the lookback can be fixed or adjusted using ADX, with longer comparisons in weaker-trend conditions and shorter ones in stronger trends. An optional Inside Bar can serve as a setup when no narrow range qualifies.

The indicator projects the box boundaries, sets a target at a multiple of box height, and can mark a stop when price closes back across the opposite box edge or an optional time exit. The article explains the logic and configuration but supplies no systematic test results or evidence of profitability. Historical TP and SL markers may aid visual review, but they do not establish robustness across markets, timeframes, or execution costs.

Key ideas

  • The setup is a two-candle range narrower than each recent 20-candle range in the selected lookback window.
  • The pattern box uses the extremes of the current setup candle and the prior setup candle.
  • The first box boundary reached determines breakout direction, subject to an optional moving-average trend filter.
  • ADX can adapt the lookback, making it longer in weak-trend conditions and shorter in strong-trend conditions.
  • Targets, opposite-side close stops, and optional time exits are tracked, but the document provides no performance validation.

Tags

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