OPEN-SOURCE SCRIPT
Atualizado

RSI DualLens [UgurTash]

1 058
RSI DualLens [UgurTash]

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
Notas de Lançamento
RSI DualLens [UgurTash]

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
Notas de Lançamento
Migrated to Pine Script v6. Selection area visuals below the candles are now hidden. No changes to calculations or alerts.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.