RSI DualLens [UgurTash]RSI DualLens
This indicator combines two powerful tools into one seamless experience: the Divergence Indicator and the RSI DualLens, giving you a complete divergence analysis suite in a single chart overlay.
What does it do?
Instead of juggling two separate indicators, RSI DualLens gives you everything on a single chart overlay:
Divergence Engine — Detects regular and hidden divergences using your choice of oscillator (RSI, CCI, CMO, COG, MFI, ROC, Stoch, WPR). Supports multiple trend detection methods: Zigzag, MA Difference, or an External signal.
RSI Lens — Projects the RSI directly onto the price chart inside a user-defined box, scaled to your chosen price range. No more switching your eyes between the price panel and a separate RSI window. Divergence lines are drawn on both price and RSI simultaneously, in the same view.
What's new in this version?
A stability fix has been added to the RSI Lens engine: on certain timeframes (particularly lower ones like 1m or 5m), a runtime error could occur when pivot indicator arrays were not yet populated. This version silently skips those incomplete pivots instead of crashing, without affecting any signal logic whatsoever.
Settings
Divergence Indicator group
Oscillator type and length
External oscillator support
Trend detection method (Zigzag / MA Difference / External)
MA filter type and length
Zigzag length
Calculation bars
Repaint toggle
RSI Lens group
Corner points for the RSI window (set on chart)
RSI length
Moving average type and length
Zigzag length
Show pivot labels toggle
Display zigzag toggle
Color settings
Alerts group
Bullish Divergence
Bullish Hidden Divergence
Bearish Divergence
Bearish Hidden Divergence
Pine Script® indicator






















