Divergence Finder (RSI/Price) with Options
Dec 1, 2022

The Divergence Finder (RSI/Price) with Options indicator is a versatile tool designed to identify potential trend reversals by detecting divergences between price action and momentum oscillators like the RSI or OBV. By highlighting discrepancies where price makes new extremes while the oscillator fails to follow, the tool provides actionable buy and sell signals directly on the chart.
Usage
The tool identifies two main types of signals:
- Buy Divergence: Occurs when price makes a lower low while the RSI (or OBV) makes a higher low. This often suggests a potential upward reversal.
- Sell Divergence: Occurs when price makes a higher high while the RSI (or OBV) makes a lower high. This suggests a potential downward reversal.
Users can choose between RSI and OBV as the secondary source for divergence calculation. The indicator also features a "Display tops/bottoms" mode that visualizes the fractal points used to anchor the divergence lines, helping users understand the structural context of each signal.
Details
The script utilizes a fractal-based logic to identify pivot points (tops and bottoms). It requires a user-defined number of bars to confirm a peak or trough, ensuring that the points being compared are significant structural levels.
A unique aspect of this script is its rigorous filtering system. It doesn't just look for any divergence; it allows users to set specific RSI/OBV threshold levels for both the historical point (p1) and the recent point (p2). This ensures signals are only generated when the oscillator is in overbought or oversold territory, or within specific zones defined by the trader. Furthermore, margin requirements can be set to ensure the price or oscillator difference is significant enough to be considered a valid signal.
Settings
Display
- Display tops/bottoms: Toggles the visibility of the fractal peaks and troughs used for calculations.
- Display Detailed Divergence labels: When enabled, provides detailed text labels showing the exact price and oscillator values for both points of the divergence.
Sensitivity
- Candle needed to validate last point: Sets the number of bars required on either side of a high/low to confirm it as a pivot point.
Sources
- Select Divergence using RSI or OBV: Switch between Relative Strength Index and On-Balance Volume.
- Source for Price Sell/Buy Div: Choose the price source (Close, High, Low) used to determine the price peaks and troughs.
- Source for RSI Div: Choose the price source used to calculate the RSI.
Filters
- Min/Max RSI for p1/p2: Sets the required oscillator levels for the first (past) and second (current) points to validate a divergence.
- Min margin between price/RSI points (%): A percentage-based filter that requires a minimum distance between the two points to trigger a label.
FAQ
How do I use the Divergence Finder (RSI/Price) with Options?
Simply add it to your chart and monitor for "Buy" or "Sell" labels. You can adjust the sensitivity settings to match the volatility of the asset you are trading.
Can I change the oscillator used for divergence?
Yes, you can switch between the RSI and OBV via the "Select Divergence using RSI or OBV" dropdown in the settings menu.
How can I get access to 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.