RSI Potential Divergence
Jul 11, 2022

The RSI Potential Divergence indicator identifies early-stage momentum divergences on the Relative Strength Index (RSI) to provide traders with timely reversal signals. By highlighting potential divergences before they are fully confirmed by traditional pivot lookbacks, this tool aims to mitigate the lag often associated with standard divergence detection.
Usage
The tool distinguishes between "Potential" and "Confirmed" signals to help traders anticipate market shifts:
- Potential Divergences: Indicated by a "B" label (Bullish/Bearish) or "H" label (Hidden). These appear earlier in the formation process, allowing for proactive monitoring of emerging momentum shifts.
- Confirmed Divergences: These are signaled with the labels "Bull", "Bear", "H Bull", or "H Bear" along with a connecting line. Confirmation occurs once the price and oscillator have satisfied the pivot lookback requirements.
- Regular vs. Hidden: Regular divergences suggest potential trend reversals, while hidden divergences typically indicate trend continuation.
Details
The script utilizes the RSI as its primary oscillator to measure momentum. Unlike standard indicators that only plot divergences once a pivot is fully established (requiring a set number of bars to the right), this script scans for the early structural conditions of a divergence. It incorporates a customizable lookback range to filter the distance between peaks and troughs, ensuring that only relevant momentum anomalies are highlighted.
Settings
RSI Settings
- RSI Length: Sets the period for the RSI calculation (default is 14).
- Source: Determines the price data used for the RSI (e.g., Close, Open, HL2).
- MA Type: Selects the moving average type to be applied to the RSI (SMA, EMA, WMA, etc.).
- MA Length: Sets the period for the RSI-based moving average.
Divergence Settings
- Show Divergence: Toggles the visibility of all divergence markings.
- Pivot Lookback Right/Left: Determines the number of bars required to the right and left to confirm a local high or low.
- Max/Min Lookback Range: Sets the maximum and minimum distance allowed between two pivots to qualify as a divergence.
- Plot Visibility: Individual toggles for Regular Bullish/Bearish, Hidden Bullish/Bearish, and their respective "Potential" variants.
FAQ
How do I use the RSI Potential Divergence?
You can use the early "B" or "H" labels to prepare for a trade and wait for the "Bull" or "Bear" confirmation labels to validate the momentum shift.
What is the difference between regular and hidden divergence?
Regular divergence suggests a trend reversal, whereas hidden divergence usually suggests the current trend is likely to continue.
How can I access this tool?
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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.