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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.