All indicators

RSI Divergence

Oct 1, 2019

Static chart image
SignalsOscillatorsDivergences

The RSI Divergence indicator identifies standard and hidden divergences between price action and the Relative Strength Index (RSI) to highlight potential trend reversals or continuations.

Usage

The indicator displays four distinct signals on the RSI oscillator to assist in market analysis:

  • Bullish Divergence (Green Triangle): Occurs when price makes a lower low but the RSI makes a higher low, suggesting a potential upward reversal.
  • Bearish Divergence (Red Triangle): Occurs when price makes a higher high but the RSI makes a lower high, suggesting a potential downward reversal.
  • Hidden Bullish Divergence (Green Circle): Occurs when price makes a higher low but the RSI makes a lower low, often indicating trend continuation.
  • Hidden Bearish Divergence (Red Circle): Occurs when price makes a lower high but the RSI makes a higher high, often indicating trend continuation.

Users can utilize these signals to identify exhaustion points in a current trend or to find high-probability entry points aligned with the prevailing momentum. The indicator also supports alerts for both regular and hidden divergences.

Details

The script calculates a standard 14-period RSI and scans a lookback window of 60 bars to identify local peaks and troughs in both price and the oscillator.

To reduce noise and prevent repetitive signaling, the detection logic incorporates a one-candle delay. This ensures that the divergence is confirmed by the subsequent candle's movement before a shape is plotted. The script also requires the RSI to be above or below specific user-defined thresholds (e.g., above 60 for bearish or below 40 for bullish) to ensure signals occur at extreme levels. This script was inspired by original concepts from @Libertus.

Settings

  • Min Bearish RSI: Sets the minimum RSI level required for a bearish divergence signal to trigger.
  • Max Bullish RSI: Sets the maximum RSI level allowed for a bullish divergence signal to trigger.

FAQ

How do I access RSI Divergence?

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

What RSI values are recommended?

While the default is 60/40, common settings for overbought and oversold filters include 70/30 or 60/40 depending on the volatility of the asset being traded.

Can I set alerts for these signals?

Yes, the script includes alert conditions for both "RSI Divergence" (regular) and "Hidden RSI Divergence," which can be configured through the TradingView alerts menu.

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.