Skip to content
All library documents

Reversal Trap Bands with RSI-Bucketed Historical Hit Rates

Article ProRealCode

Summary

The indicator places a wide volatility envelope around a 55-period exponential moving average, using four times the 55-period average true range. It flags bullish or bearish traps when price moves beyond a band and returns inside, subject to a limit on time spent outside and a signal cooldown. Each signal opens a virtual trade targeting the baseline, with a stop based on recent extremes and a fraction of the 100-period ATR.

Resolved trades are grouped by RSI decile, and new signals display the historical win frequency for their bucket alongside overall long and short statistics. These rates describe observed outcomes for the loaded symbol, timeframe, and history; they are not predictive probabilities. Small samples can make rates misleading, and results depend on indicator definitions and history. The supplied code also includes implementation details that merit independent review before relying on its recorded statistics or using the indicator in live trading.

Key ideas

  • The indicator identifies band rejections using a wide EMA-and-ATR envelope and a maximum outside-band duration.
  • A virtual trade targets the baseline and places a stop beyond a recent price extreme with an ATR adjustment.
  • Resolved outcomes are grouped by RSI decile to display historical hit rates for later signals.
  • The rates are historical frequencies for the selected instrument, timeframe, and data history.
  • Small samples and implementation choices can make displayed percentages unreliable.

Tags

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