All indicators

RSI Divergence Projection

Aug 30, 2025

Static chart image
SignalsForecastingOscillatorsDivergences

The RSI Divergence Projection indicator is a forward-looking analysis tool that identifies four types of RSI divergence while projecting real-time price thresholds required to validate emerging signals. By reverse-engineering the RSI formula, it provides traders with actionable price levels before a divergence is fully confirmed on the chart.

Usage

The indicator identifies and plots both regular and hidden divergences. Regular divergences typically signal potential trend reversals, while hidden divergences often indicate trend continuation.

  • Confirmed Divergences: When a divergence is validated, the script plots solid lines on the price chart labeled "B" (Regular) or "HB" (Hidden).
  • Predictive Projections: When the market structure suggests a potential divergence is forming on the current live candle, the script displays dashed lines.
  • Threshold Line: A unique horizontal dashed line is projected forward, representing the "Confirmation Price." This indicates the specific closing level the next candle must reach to maintain the RSI relationship necessary for the divergence to remain valid.

Details

The core innovation of this tool is the projection engine. Unlike standard indicators that only show historical signals, this script uses mathematical reverse-engineering of the Relative Strength Index (RSI).

It calculates the "tipping point" by determining the exact average gain/loss ratio required for the current RSI to equal the RSI of the previous pivot. This allows the script to solve for the unknown variable—price—and plot it as a future target. Additionally, a Divergence Strength Score (out of 10) is calculated based on RSI location (overbought/oversold levels) and the magnitude of disagreement between price and momentum.

Settings

RSI Divergence

  • RSI Period: The number of bars used for the RSI calculation (default is 14).
  • Use Price Wicks or Bodies?: Determines if the script looks for pivots based on the candle's extreme highs/lows or the open/close levels.
  • Pivot Lookback Left/Right: Sets the number of bars required to identify a pivot point.
  • Lookback Range Max/Min: Defines the distance between two pivots for a divergence to be valid.
  • Plot Toggles: Individual switches to enable or disable Regular/Hidden Bullish and Bearish signals.

Predictive Divergences

  • Show Predictive Divergences: Master toggle for the real-time analysis engine.
  • Min Bars Since Last Pivot: Sets the minimum elapsed time before searching for new potential signals.
  • Show Divergence Confirmation Price: Enables the horizontal projection line and price label.

Divergence Strength Score

  • Show Strength Score: Displays a 1-10 rating on the projection labels.
  • RSI Overbought/Oversold Levels: Customizable thresholds used to weigh the Location Score of a signal.

FAQ

How do I interpret the Strength Score?

The score combines a "Location Score" (how extreme the RSI is) and a "Magnitude Score" (the degree of divergence between price and RSI). A higher score suggests a more significant statistical disagreement.

What is the difference between dashed and solid lines?

Dashed lines represent "Potential" divergences occurring in real-time on the unclosed bar. Solid lines represent "Confirmed" divergences that have met the pivot lookback requirements.

How can I access RSI Divergence Projection?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.