RSI/RSX Divergence
Feb 26, 2022

The RSI/RSX Divergence indicator is a comprehensive momentum analysis tool that combines traditional Relative Strength Index (RSI) with a noise-free RSX variant to identify market reversals through divergence detection. It aims to provide more reliable trading signals by filtering out market noise and highlighting discrepancies between price action and momentum.
Usage
The indicator can be used to spot potential trend reversals by identifying regular and hidden divergences. Traders can toggle between the standard RSI and the RSX, which offers a smoother, "noise-free" calculation without the typical lag associated with moving averages.
- RSI Analysis: Standard momentum measurement to identify overbought (>70) or oversold (<30) conditions.
- RSX Analysis: Use the RSX for a clearer view of momentum trends, as it attempts to eliminate jitter while maintaining responsiveness to price changes.
- Divergence Detection: Automatically plots positive (bullish) and negative (bearish) divergences. A positive divergence occurs when price makes lower lows while the indicator makes higher lows, suggesting a potential upward reversal.
- Histogram: A customizable histogram can be enabled to visualize the strength of RSI or RSX relative to a chosen moving average.
Details
The script integrates two primary oscillators:
- Relative Strength Index (RSI): A classic oscillator measuring the speed and change of price movements.
- RSX: Based on the SharkCIA implementation, this is a "noise-free" version of the RSI. Unlike simple smoothing which introduces lag, the RSX uses a sophisticated multi-stage filtering process to maintain alignment with price while removing volatility.
The indicator also supports volume-based calculations for both RSI and RSX, allowing users to factor in market liquidity. Extensive smoothing options are available, including DEMA, TEMA, KAMA, and Jurik-style variations, to tailor the output to specific market conditions.
Settings
- Calculation Source: Determines the price input used for calculations (e.g., Close, HLC3).
- Histogram Group: Controls the visibility, variant (RSI or RSX), and moving average type used for the histogram.
- RSI Group: Toggles the RSI line, volume-based calculation, divergence markers, and overbought/oversold breakout coloring. Includes independent period and smoothing settings.
- RSX Group: Toggles the RSX line, volume-based calculation, and divergence markers. Includes independent period and smoothing settings.
- Divergence Identification: Adjusts the pivot lookback (left/right) and range (min/max) to fine-tune how divergences are detected.
- Levels: Sets the threshold values for overbought, oversold, and the equilibrium crossline.
FAQ
How do I use the RSX instead of the standard RSI? You can enable or disable either oscillator in the settings menu under the "RSI: On/Off" and "RSX: On/Off" toggles. They can be viewed simultaneously for comparison.
What does the volume-based calculation do? When enabled, the RSI/RSX calculation incorporates volume data into the relative strength formula, which can help confirm if momentum changes are supported by market activity.
How can I access RSI/RSX Divergence? 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.