RSI Divergence – Real-Time
Feb 20, 2025

The RSI Divergence – Real-Time indicator identifies bullish and bearish divergences between price action and the Relative Strength Index (RSI) using an adaptive, multi-term detection engine.
Usage
The Usage section describes how traders can interpret the signals provided by the script to identify potential trend reversals or continuations.
- Trend Reversals: Look for Bullish Divergences (green lines/labels) appearing at established support levels and Bearish Divergences (red lines/labels) appearing at resistance zones.
- Trend Continuation: Use divergence signals as a momentum check; a divergence against the trend may suggest a pullback, while a divergence in alignment with the trend can confirm local strength.
- Scalping & Swing Trading: Users can toggle between Short, Medium, and Long-term modes to align the sensitivity of the RSI and pivot detection with their specific trading style.
Details
The script utilizes pivot-based logic to compare price extremes with RSI extremes. It is designed to operate in real-time, meaning it evaluates conditions as they develop rather than waiting for excessive bar closes, which helps reduce lag.
A key feature is the Adaptive RSI Calculation. Instead of a static length, the script can automatically adjust its parameters based on the chart interval:
- Short-Term: Optimized for 1-5 minute charts (RSI 7).
- Medium-Term: Optimized for 15-60 minute charts (RSI 14).
- Long-Term: Optimized for 4-hour charts and above (RSI 28).
In "All-Term" mode, the indicator dynamically selects these settings based on the current timeframe of the chart, ensuring the sensitivity of the divergence detection remains relevant to the price action being viewed.
Settings
Main Settings
- Time Frame: Selects the lookback and RSI length (Short, Medium, Long, or All). "All" adapts automatically to the chart period.
- Symbol Size: Adjusts the visual size of the labels on the chart (Tiny to Huge).
- Show Divergence Labels: Toggles the visibility of the text labels indicating a divergence.
- Bullish/Bearish Divergence Color: Customizes the color of the lines and labels for each divergence type.
- Show Symbols: Toggles the display of the "D" icons on the chart.
FAQ
How do I access RSI Divergence – Real-Time?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Does this indicator repaint?
No, the script is designed for real-time detection based on pivot points. Once a divergence condition is met and the visual is placed, it provides an immediate signal.
What is the best timeframe to use this on?
The indicator is designed to be versatile. Using the "All" setting allows the script to automatically provide the most appropriate RSI length for any timeframe, from 1-minute scalping to daily swing trading.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

