All indicators

RSI Candle with Advanced RSI fomula

Sep 15, 2021

Static chart image
OscillatorsCandlestickDivergences

The RSI Candle with Advanced RSI fomula indicator provides a modernized approach to Relative Strength Index analysis by visualizing RSI values as candlesticks and applying a volatility-correcting formula for non-standard lookback periods. This tool aims to solve the issue of RSI flattening near the 50-level on high periods and becoming overly volatile on low periods, while offering deeper insight into intraday price extremes through high/low RSI calculations.

Usage

The Usage section focuses on interpreting the dual-functionality of this script: Advanced RSI calculations and RSI Candlestick visualization.

Advanced RSI Scaling When the "RSI Advanced" setting is enabled, the indicator adjusts the RSI curve based on its length.

  • For periods greater than 14, it expands the fluctuation range, preventing the value from "sticking" to the 50 midline and allowing overbought/oversold levels to remain functional.
  • For periods less than 14, it reduces excessive noise, making the trend easier to follow.
  • This scaling allows for multi-timeframe analysis on a single chart. For example, a length of 168 on a 5-minute chart will behave similarly to a length of 14 on a 60-minute chart.

RSI Candlestick Visualization Instead of a single line based on closing prices, the indicator calculates what the RSI would be if the high or low of the bar were the closing price.

  • Wicks: Long upper or lower wicks on the RSI candles represent significant price extensions (highs/lows) that were not sustained by the close.
  • Divergence: Users can identify divergences not just on closing prices, but by comparing price highs/lows to the high/low wicks of the RSI candles.

Details

The script functions by reversing the standard RSI equation to incorporate high and low price data into the calculation. Typically, RSI is a univariate indicator using only the close. By treating the high and low as potential terminal points, the script generates a synthetic "High RSI" and "Low RSI."

The "Advanced" formula uses a power function (math.pow) scaled by the ratio of the chosen length to the standard 14-period baseline. This mathematical adjustment ensures that the distribution of values remains statistically relevant for technical analysis across a wider range of input lengths.

Settings

Main Settings

  • Length: The lookback period for the RSI calculation (Default is 14).
  • RSI Advanced ??: Toggles the advanced formula that scales volatility based on the chosen length.
  • Candle or Bar or Line?: Determines the visual output of the indicator.
  • Up Color: Sets the color for bullish RSI candles/bars.
  • Down Color: Sets the color for bearish RSI candles/bars.

FAQ

How do I use the RSI Candles for divergence?

You can look for instances where the price makes a higher high, but the upper wick (High RSI) of the RSI Candle makes a lower high. This provides a more granular view of momentum than standard closing-price RSI.

Why does the RSI look different when I change the Length?

If "RSI Advanced" is enabled, the script applies a formula to ensure the RSI remains volatile enough to reach overbought (70) and oversold (30) levels, even if you use a very high length like 200.

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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.