OPEN-SOURCE SCRIPT
RSI Liquidity Sweep Confluence Engine [PhenLabs]

📊 RSI Liquidity Sweep Confluence Engine [PhenLabs]
Version: PineScript™ v6
📌 Description
The RSI Liquidity Sweep Confluence Engine rebuilds the RSI as dynamic, price-projected support and resistance levels — then waits for liquidity to be swept exactly at those levels before firing a signal. It solves the two biggest problems retail traders face with RSI and liquidity tools: RSI divergence readings that never map to price, and liquidity sweep alerts that fire on every wick with no filter.
By requiring full confluence — an RSI-derived level, a genuine liquidity sweep, and volume confirmation all aligning on the same bar — the engine suppresses noise and only marks the reversals where smart-money delivery actually shifts. Signals do not repaint on closed bars.
This is a fusion indicator. It takes the week’s most popular concept (RSI rebuilt as S/R), PhenLabs’ core specialty (liquidity sweep mapping), and the highest-traction publishing format (confluence-scored, fire-only-on-full-alignment engines) and combines them into one clean, dashboard-backed tool.
🚀 Points of Innovation
🔧 Core Components
🔥 Key Features
🎨 Visualization
📖 Usage Guidelines
✅ Best Use Cases
⚠️ Limitations
💡 What Makes This Unique
🔬 How It Works
Version: PineScript™ v6
📌 Description
The RSI Liquidity Sweep Confluence Engine rebuilds the RSI as dynamic, price-projected support and resistance levels — then waits for liquidity to be swept exactly at those levels before firing a signal. It solves the two biggest problems retail traders face with RSI and liquidity tools: RSI divergence readings that never map to price, and liquidity sweep alerts that fire on every wick with no filter.
By requiring full confluence — an RSI-derived level, a genuine liquidity sweep, and volume confirmation all aligning on the same bar — the engine suppresses noise and only marks the reversals where smart-money delivery actually shifts. Signals do not repaint on closed bars.
This is a fusion indicator. It takes the week’s most popular concept (RSI rebuilt as S/R), PhenLabs’ core specialty (liquidity sweep mapping), and the highest-traction publishing format (confluence-scored, fire-only-on-full-alignment engines) and combines them into one clean, dashboard-backed tool.
🚀 Points of Innovation
- RSI pivots mapped directly onto price as live support/resistance levels, not oscillator readings
- Liquidity sweep detection gated to fire only when the sweep occurs at an RSI-derived level
- Triple-confluence gate: RSI S/R + liquidity sweep + volume confirmation must all align
- Adaptive ATR-based tolerance so the confluence zone scales with current volatility
- WMA-smoothed S/R lines with a single soft channel fill for a clean, uncluttered chart
- No repaint on closed bars — signals confirm on bar close
🔧 Core Components
- RSI Core Levels: Confirmed RSI pivots (left/right bars configurable) are recorded with their corresponding price high/low, building a rolling set of dynamic S/R zones projected onto the chart as smoothed lines
- Liquidity Sweep Detector: Tracks swing high/low liquidity pools over a lookback window and flags genuine sweeps (wick beyond pool, optional close-back inside for reversal confirmation)
- Confluence Gate: Measures the distance between the swept price and the nearest RSI S/R level using ATR-scaled tolerance, then confirms with a volume-vs-SMA check
🔥 Key Features
- Triple Confluence Gating: Signals fire only when RSI level, liquidity sweep, and volume all agree — drastically reducing false reversals
- RSI-as-Price S/R: Converts oscillator extremes into actionable price levels you can trade against directly
- ATR-Adaptive Tolerance: Confluence zone widens in high volatility, tightens in ranges — works across timeframes and instruments without re-tuning
- Close-Back Reversal Filter: Optional requirement that price closes back inside the swept pool, filtering stop-runs that continue
- Clean Visual Layer: Two smoothed S/R lines, one soft channel fill, subtle state-tinted background and color-coded bars — premium look without chart clutter
- Live State Dashboard: Compact on-chart table shows RSI, nearest S/R levels, volume confirm, ATR, and current state at a glance
- Dual-Direction Alerts: Separate bullish and bearish alertconditions for automated notification
🎨 Visualization
- Smoothed S/R lines: A red resistance line above price and a green support line below, WMA-smoothed so transitions ease instead of snapping
- Soft channel fill: A single subtle purple band between support and resistance defining the active RSI value zone
- State background tint: Chart background subtly greens on bullish confluence, reds on bearish confluence, gold-tints when a sweep is armed
- Color-coded bars: Candle bodies shift green / red / gold based on the live confluence state
- Sweep marker + label: A single dashed box marks the exact swept liquidity pool, with a compact BULL / BEAR label at the signal bar
- Top-right dashboard: Compact state table with RSI, resistance, support, volume confirm, ATR, and Scanning / Armed / Confluence state
📖 Usage Guidelines
- RSI Length — Default: 14 — Range: 2-50 — Controls RSI period used to derive S/R levels; lower = more reactive levels, higher = more structural
- RSI Pivot Left / Right — Default: 5 / 5 — Range: 1-20 — Bars used to confirm RSI pivots; higher = fewer but more reliable levels
- Active RSI Levels Kept — Default: 4 — Range: 1-10 — Number of most-recent RSI S/R levels kept active on chart
- Level Smoothing (WMA) — Default: 3 — Range: 1-10 — WMA length applied to S/R lines for smoother transitions
- Sweep Lookback — Default: 20 — Range: 5-100 — Bars defining the swing high/low liquidity pools
- Require Close-Back — Default: true — Toggles whether price must close back inside the swept pool to validate a sweep
- RSI Level Tolerance (ATR x) — Default: 0.30 — Range: 0.0-2.0 — Distance (in ATR multiples) within which a sweep counts as touching an RSI level; 0.0 disables RSI confluence
- Volume Multiplier — Default: 1.20 — Range: 0.0-5.0 — Volume must exceed this multiple of its SMA to confirm; 0.0 disables volume confluence
- ATR Length — Default: 14 — Range: 1-100 — ATR period used to scale the confluence tolerance
✅ Best Use Cases
- Intraday and swing reversal trading on indices, FX majors, and high-liquidity crypto
- Smart-money / ICT traders who want a filtered sweep signal instead of raw sweep noise
- Traders who already use RSI but want it mapped to price as tradable S/R
- Multi-timeframe confluence stacking — run on higher TF for bias, lower TF for entries
⚠️ Limitations
- Like all pivot-based tools, signals are confirmed pivotRight bars after the pivot forms; expect a small structural lag on the S/R levels themselves
- Confluence gating reduces signal frequency by design — fewer but higher-quality signals, not a continuous signal generator
- Volume conformance requires sufficient volume data; on symbols with no volume feed, set Volume Multiplier to 0.0
- Best on instruments with genuine liquidity pools and clean swings; choppy low-range sessions produce fewer qualified setups
💡 What Makes This Unique
- RSI-as-S/R fused with liquidity sweeps: No top community script currently combines RSI-derived price levels with sweep detection — this fills that white space
- Fire-only-on-full-confluence design: Uses the highest-viral-ratio publishing format (confluence-scored engines) applied to PhenLabs’ core liquidity specialty
🔬 How It Works
- RSI S/R construction: The engine computes RSI, detects confirmed pivots via left/right lookbacks, and records the price high (resistance) or low (support) at each RSI pivot bar. The most recent levels are kept in a rolling buffer, WMA-smoothed, and projected as clean lines on the chart with a soft channel fill between them.
- Liquidity pool tracking: Swing highs and lows over the configured lookback define resting liquidity pools. A sweep is registered when price wicks beyond a pool — and optionally closes back inside it, confirming a reversal rather than a continuation stop-run.
- Triple confluence gating: The engine checks that the sweep occurred within an ATR-scaled tolerance of the nearest RSI S/R level, and that volume exceeded its moving average by the configured multiple. Only when all three gates align does a bullish or bearish signal marker fire, with a dashed box marking the exact swept pool and a BULL / BEAR label at the signal bar.
💡 Note:
Best results come from pairing the engine with your own market-structure read and using it as a high-probability entry filter rather than a standalone signal. Tune RSI Length and Tolerance to your timeframe — shorter for scalping, longer for swing. This tool is an analytical aid to support your own judgment and is not financial advice.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
TradingView Charting w/ Crypto Systems: phenlabs.com
Join our growing community: discord.gg/phen
All content provided by PhenLabs is for informational & educational purposes only. Past performance does not guarantee future results.
Join our growing community: discord.gg/phen
All content provided by PhenLabs is for informational & educational purposes only. Past performance does not guarantee future results.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
TradingView Charting w/ Crypto Systems: phenlabs.com
Join our growing community: discord.gg/phen
All content provided by PhenLabs is for informational & educational purposes only. Past performance does not guarantee future results.
Join our growing community: discord.gg/phen
All content provided by PhenLabs is for informational & educational purposes only. Past performance does not guarantee future results.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.