All indicators

Just Another RSI

Apr 25, 2022

Static chart image
SignalsOscillators

The Just Another RSI indicator is a specialized momentum oscillator that reimagines the Relative Strength Index (RSI) calculation using arrays to measure the comparative strength between bullish and bearish candles without the constraints of fixed-length lookbacks.

Usage

The Just Another RSI can be used to identify shifts in market momentum and strength. Unlike the standard RSI, which incorporates zero values for non-gain/non-loss bars into its average, this script only considers actual gains on green candles and actual losses on red candles.

  • Bullish/Bearish Regions: Instead of traditional overbought (70) and oversold (30) levels, the indicator highlights bullish (above 60) and bearish (below 40) regions.
  • Divergence Analysis: Because the index measures raw strength differences without the smoothing effect of zero-value bars, it may diverge from price when a movement is not supported by underlying volume or intensity.
  • Variable Sensitivity: By toggling between mean (sum) and median calculations, users can adjust how outliers in price movement affect the indicator.

Details

The script utilizes arrays to store historical price changes. The core difference from standard RSI lies in the "New Process" methodology:

  • Gain Isolation: Only price increases are added to the gain array; candles with no gain are not averaged as zero, but simply excluded from the calculation set.
  • Loss Isolation: Only price decreases are added to the loss array.
  • Calculation Logic: By calculating the ratio between the average/median of the last N actual gains and losses, the indicator provides a purer representation of relative strength.
  • Technical Implementation: Because it uses arrays (array.slice and array.unshift), the script can theoretically support variable lengths, offering a flexibility not found in built-in pine script RSI functions.

Settings

  • jaRSI Source: Determines the price data used for the calculation (typically "Close").
  • jaRSI Length: The lookback period for the number of gains and losses to be considered.
  • Use median gain/loss: When enabled, the script uses the median value of the gain/loss arrays instead of the sum/average, reducing the impact of extreme price spikes.

FAQ

How do I interpret the 40 and 60 levels?

The 60 level represents the threshold for a Bullish Region, suggesting strong upward strength. The 40 level represents the Bearish Region, suggesting strong downward strength.

How is this different from the built-in RSI?

Standard RSI includes all bars in its lookback, treating red bars as "0 gain" and green bars as "0 loss." This version ignores those zeros and only compares the magnitudes of actual gains against actual losses.

How can I get access to Just Another RSI?

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.