RSI Divergence By HaykTrading (Chart + RSI)

This indicator detects classic and hidden RSI divergences while applying a strict filter: divergences are only shown when the starting (older) pivot on the RSI is in an extreme zone — below the lower limit (default 30, oversold) for bullish divergences, or above the upper limit (default 70, overbought) for bearish ones.
This filtering focuses on higher-probability setups that originate from truly overbought/oversold conditions, reducing noise from mid-range divergences.
Key Features:
• Regular and hidden bullish/bearish divergences
• Customizable RSI length, source, and moving average overlay
• Adjustable extreme zone limits (default 30/70)
• Colored circle markers on RSI pivot points
• Divergence lines drawn simultaneously:
- On the RSI pane (solid for regular, dashed for hidden)
- On the main price chart (overlaid using force_overlay=true) connecting the price pivots
• Gradient fills for overbought/oversold zones
• Built-in alert conditions for all four divergence types
How It Works:
The script identifies pivot highs/lows on the RSI, checks for price vs. oscillator disagreement within a recent range (5-60 bars), and only validates the divergence if the previous RSI pivot was in the user-defined extreme zone.
Usage Tips:
• Enable/disable regular and hidden divergences via inputs
• Adjust the Bull Start Limit (<) and Bear Start Limit (>) to suit different assets or timeframes (e.g., 20/80 for more extreme filtering)
• Lines on the price chart make it easy to see the exact price pivots without switching panes
• Best used on higher timeframes for cleaner signals
No repainting | Works on all markets and timeframes
Enjoy responsible trading — this is a tool for analysis, not financial advice.
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente HaykTrading.
TradingView NON consiglia di acquistare o utilizzare uno script a meno che non si abbia piena fiducia nel suo autore e se ne comprenda il funzionamento. È inoltre possibile trovare alternative gratuite e open source nei nostri script della community.
Istruzioni dell'autore
Declinazione di responsabilità
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente HaykTrading.
TradingView NON consiglia di acquistare o utilizzare uno script a meno che non si abbia piena fiducia nel suo autore e se ne comprenda il funzionamento. È inoltre possibile trovare alternative gratuite e open source nei nostri script della community.