RSI Divergence V1.0
Sep 11, 2020

The RSI Divergence V1.0 indicator automatically detects and labels regular and hidden divergences between price action and the Relative Strength Index (RSI), helping traders identify potential trend reversals or trend continuation signals.
Usage
The RSI Divergence V1.0 tool is used to spot discrepancies between price momentum and actual price movement.
- Regular Bullish Divergence: Occurs when price makes a lower low, but the RSI makes a higher low. This suggests a potential reversal to the upside.
- Regular Bearish Divergence: Occurs when price makes a higher high, but the RSI makes a lower high. This suggests a potential reversal to the downside.
- Hidden Bullish Divergence: Occurs when price makes a higher low, but the RSI makes a lower low, often indicating trend continuation.
- Hidden Bearish Divergence: Occurs when price makes a lower high, but the RSI makes a higher high, often indicating trend continuation.
Traders can use these signals to anticipate exhaustion in a current trend or to find optimal entry points in the direction of the prevailing trend.
Details
The script calculates the RSI based on a user-defined period and source. It utilizes pivot points (defined by the "Pivot Left" and "Pivot Right" settings) to identify significant highs and lows in both price and the oscillator. A divergence is confirmed only if the two pivots occur within a specific lookback range (Range Min to Range Max), ensuring the signals are timely and relevant to recent price action.
Settings
- RSI Period: Sets the number of bars used to calculate the RSI (default is 14).
- RSI Source: Determines the price data used for the RSI calculation (e.g., close, open, hl2).
- Pivot Right: The number of bars to the right of a pivot point to confirm its strength.
- Pivot Left: The number of bars to the left of a pivot point to confirm its strength.
- Range Max: The maximum number of bars allowed between two pivots for a divergence to be valid.
- Range Min: The minimum number of bars allowed between two pivots.
- Show Bull/Bear: Toggles the visibility of regular bullish and bearish divergence labels.
- Show Hidden Bull/Bear: Toggles the visibility of hidden bullish and bearish divergence labels.
FAQ
How do I access RSI Divergence V1.0?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the difference between Regular and Hidden divergence?
Regular divergence typically indicates a potential trend reversal, while hidden divergence often suggests that the current trend is likely to continue after a brief consolidation.
Can I change the sensitivity of the signals?
Yes, by adjusting the Pivot Left and Pivot Right settings, you can filter for more significant (higher values) or more frequent (lower values) divergence signals.
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.