Skip to content
All library documents

RSI Divergence Entries with Threshold-Based Exits

Article Strategy library · Author: Pro_Trader_HTBB

Summary

This strategy combines regular RSI divergence with adjustable RSI thresholds. It calculates a 14-period RSI by default and identifies bullish divergence when price makes a lower pivot low while RSI forms a higher low; bearish divergence pairs a higher price pivot high with a lower RSI high. The comparison uses confirmed pivots with five bars on each side, and prior pivots must fall within a specified lookback range. A long is opened when bullish divergence coincides with RSI below the configured long-entry level, while a short requires bearish divergence and RSI above its short-entry threshold.

Positions are closed when RSI reaches the respective long or short exit threshold. The script sets percentage-based order sizing and includes commission in its strategy settings, but the supplied excerpt contains no backtest report, instrument, or timeframe. Pivot-based signals are confirmed only after subsequent bars arrive, and the chosen levels are parameters rather than evidence of robust performance. The visible text ends during the visualization section, so any additional logic beyond the shown entries and exits cannot be assessed.

Key ideas

  • Bullish divergence pairs a lower price pivot low with a higher RSI pivot low.
  • Bearish divergence pairs a higher price pivot high with a lower RSI pivot high.
  • Entry thresholds gate divergence signals, and separate RSI levels trigger position exits.
  • Pivot confirmation uses bars on both sides, so signals are not available at the initial turning point.
  • The excerpt gives no market-specific or backtest evidence for the selected parameters.

Tags

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