All indicators

Rsi Divergence Bars

Dec 19, 2014

Static chart image
SignalsOscillatorsDivergences

The Rsi Divergence Bars indicator identifies and highlights price bars based on their relationship with Relative Strength Index (RSI) extremes, specifically flagging potential trend exhaustion and divergences.

Usage

The indicator is used to visually identify when price action is deviating from RSI momentum or confirming extreme trends. It colors bars differently depending on whether the RSI is in overbought or oversold territory and whether the price candle is bullish or bearish.

  • Overbought Trend: When RSI is above the overbought threshold and the candle is bullish, bars are colored green, indicating strong upward momentum.
  • Overbought Divergence: When RSI is above the overbought threshold but the candle is bearish, bars are colored red, suggesting a potential bearish reversal or divergence.
  • Oversold Divergence: When RSI is below the oversold threshold but the candle is bullish, bars are colored green, suggesting a potential bullish reversal or divergence.
  • Oversold Trend: When RSI is below the oversold threshold and the candle is bearish, bars are colored gray, indicating sustained downward momentum.

Details

The script utilizes a standard RSI calculation over a user-defined period. The core logic monitors the intersection of RSI levels and candle polarity (Open vs. Close). By highlighting bars where the price direction opposes the RSI extreme (e.g., a red candle while RSI is overbought), it provides a simple visual filter for detecting "Divergence Bars" that may precede a change in trend direction.

Settings

  • RSI Period: Determines the number of bars used to calculate the Relative Strength Index. Higher values result in a smoother RSI.
  • Overbought: Sets the upper threshold (typically 70) above which the market is considered overbought.
  • Oversold: Sets the lower threshold (typically 30) below which the market is considered oversold.

FAQ

How do I interpret the red bars in an uptrend?

Red bars appearing while RSI is overbought indicate that despite the momentum, the current candle closed lower than it opened, signaling a potential loss of strength or a bearish divergence.

Can I change the sensitivity of the signals?

Yes, by adjusting the RSI Period or the Overbought/Oversold thresholds in the settings, you can make the bar coloring more or less frequent.

How can I access Rsi Divergence Bars?

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.