OPEN-SOURCE SCRIPT
RSI Divergence Liquidity

RSI Divergence Liquidity is an indicator designed to help you catch high-probability BUY reversals by combining two powerful concepts:
XAUUSD 
Liquidity Sweep / Swing Low: automatically marks swing-low levels and tracks when price sweeps below them and reacts back.
Bullish RSI Divergence: filters noise by comparing RSI at the swing area versus RSI at the retest, favoring reversals with stronger momentum confirmation.
How it works
The script draws Swing Low lines using Pivot Lows. When a new Swing Low forms, the previous one is cut/frozen .
When price retests a Swing Low and the candle conditions are met (bar n bullish, bar n-1 bearish), the script checks:
Whether RSI at n/n-1 is higher than the RSI at the swing (bullish divergence logic)
Whether min RSI at the swing is below a threshold (default < 36) to focus on oversold swing areas
If all conditions pass, the indicator prints an upward triangle right when bar n closes → a potential BUY signal.
How to use
Enter BUY when an up triangle appears at/near the Swing Low (liquidity sweep zone).
Stop Loss idea: below the most recent swing low / below the sweep wick.
Take Profit idea: nearest supply zone, prior high, or fixed RR such as 1:2 / 1:3 depending on your system.
Recommended settings
Best on: M5–H1 (depending on your style), especially effective when price is trending down and performs a clear sweep.
For stricter filtering: lower Max minRSI at Swing (x) to only take signals from deeper RSI lows.
Smaller Pivot Lookback → more swings/signals; larger values → fewer but cleaner swings.
Note: This tool improves probability, not certainty. Combine it with market structure / key levels and proper risk management for best results.
Liquidity Sweep / Swing Low: automatically marks swing-low levels and tracks when price sweeps below them and reacts back.
Bullish RSI Divergence: filters noise by comparing RSI at the swing area versus RSI at the retest, favoring reversals with stronger momentum confirmation.
How it works
The script draws Swing Low lines using Pivot Lows. When a new Swing Low forms, the previous one is cut/frozen .
When price retests a Swing Low and the candle conditions are met (bar n bullish, bar n-1 bearish), the script checks:
Whether RSI at n/n-1 is higher than the RSI at the swing (bullish divergence logic)
Whether min RSI at the swing is below a threshold (default < 36) to focus on oversold swing areas
If all conditions pass, the indicator prints an upward triangle right when bar n closes → a potential BUY signal.
How to use
Enter BUY when an up triangle appears at/near the Swing Low (liquidity sweep zone).
Stop Loss idea: below the most recent swing low / below the sweep wick.
Take Profit idea: nearest supply zone, prior high, or fixed RR such as 1:2 / 1:3 depending on your system.
Recommended settings
Best on: M5–H1 (depending on your style), especially effective when price is trending down and performs a clear sweep.
For stricter filtering: lower Max minRSI at Swing (x) to only take signals from deeper RSI lows.
Smaller Pivot Lookback → more swings/signals; larger values → fewer but cleaner swings.
Note: This tool improves probability, not certainty. Combine it with market structure / key levels and proper risk management for best results.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Strategy Lab | Gold strategies & indicators.
TradingView scripts: tradingview.com/u/StrategyLAB_/
Youtube Link: youtube.com/@StrategyLab_Gold
TradingView scripts: tradingview.com/u/StrategyLAB_/
Youtube Link: youtube.com/@StrategyLab_Gold
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Strategy Lab | Gold strategies & indicators.
TradingView scripts: tradingview.com/u/StrategyLAB_/
Youtube Link: youtube.com/@StrategyLab_Gold
TradingView scripts: tradingview.com/u/StrategyLAB_/
Youtube Link: youtube.com/@StrategyLab_Gold
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.