All indicators

RSI

Mar 15, 2022

Static chart image
SignalsOscillatorsCandlestickChannelsDivergences

The RSI indicator tool visualizes the Relative Strength Index as a candle chart combined with linear regression channels to better identify trend exhaustion and reversal points.

Usage

The script can be used to identify overextended market conditions by observing the RSI candles in relation to the linear regression channel. When RSI candles reach the upper or lower boundaries of the regression channel, it suggests potential support or resistance within the RSI's own momentum.

Key usage scenarios include:

  • Trend Shifts: Look for divergence signals occurring simultaneously with RSI candles hitting the linear regression boundaries. This confluence provides a stronger basis for predicting a trend reversal.
  • Volatility Analysis: The width of the linear regression channel, controlled by the standard deviation setting, helps filter out minor momentum fluctuations.
  • Momentum Candlesticks: Use the RSI candle bodies and wicks to assess the "internal" price action of the momentum itself, providing more detail than a standard single-line RSI.

Details

This script transforms the standard RSI into a candlestick format, where wicks and bodies represent momentum fluctuations over the specified period. To provide a structural framework for these fluctuations, a linear regression calculation is applied directly to the RSI values. The script uses a least-squares approach to calculate the slope and intercept, forming a central trendline. Deviations are then applied to this trendline to create a channel that acts as dynamic support and resistance for the RSI candles. Additionally, the script includes a multi-level divergence detection engine that identifies discrepancies between price action and RSI momentum across various lookback periods.

Settings

  • RSI Settings
    • Right/Left Bars for Pivots: Determines the number of bars required to confirm a pivot high or low for divergence detection.
    • Pivot Source for Bear/Bull Divs: Sets the price source (e.g., Close, High, Low) used to compare against RSI for divergence.
    • RSI Length: The lookback period for the Relative Strength Index calculation.
    • Lookback Level for Divs: Controls the depth of the divergence search (1 to 5 levels).
  • Linear Regression Settings
    • Linear Regression On / Off: Toggles the visibility of the regression channel.
    • Trend Period: The lookback window used to calculate the linear regression slope.
    • Deviation: The multiplier for the standard deviation to determine channel width.
    • Estimator: Choose between "Biased" or "Unbiased" statistical estimation for the deviation.
    • Extend: Sets whether the regression lines extend to the right or remain as segments.

FAQ

How do I access RSI?

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

What is the advantage of RSI candles over a standard line?

RSI candles provide visual information about the "open, high, low, and close" of momentum within a specific timeframe, making it easier to see price rejection and volatility within the indicator itself.

How do I interpret the divergence signals?

Divergence signals indicate that price and momentum are moving in opposite directions. When these appear at the edges of the linear regression channel, they suggest a high probability of a trend change.

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.