OPEN-SOURCE SCRIPT
Liquidity Sweep & Absorption Reversal Engine [PhenLabs]

📊 Liquidity Sweep & Absorption Reversal Engine [PhenLabs]
Version: PineScript™ v6
📌 Description
The Liquidity Sweep & Absorption Reversal Engine (LSA Engine) is a two-stage reversal tool that separates high-probability liquidity stop-runs from the noise of ordinary breakouts. Most sweep indicators fire the moment price pokes through a swing high or low — the LSA Engine refuses to commit until that sweep is confirmed by genuine institutional absorption.
The problem it solves is simple but expensive: not every wick beyond a prior high or low is a smart-money stop hunt. Many are clean breakouts that keep going. By requiring a volume spike paired with a disproportionately small body (volume that failed to displace price), the engine filters for the specific fingerprint of absorbed liquidity — the moment resting orders are consumed and price is rejected. Only then does it flag a reversal and project the opposing draw.
The result is a clean, dashboard-backed overlay that gives smart-money, ICT, and intraday reversal traders a single source of truth for swept liquidity, absorption status, and the next untaken pool — without the false-signal storm of a raw sweep detector.
🚀 Points of Innovation
🔧 Core Components
🔥 Key Features
🎨 Visualization
📖 Usage Guidelines
Structure & Liquidity
Absorption Filter
Targets & Projection
Visuals
✅ Best Use Cases
⚠️ Limitations
💡 What Makes This Unique
🔬 How It Works
Version: PineScript™ v6
📌 Description
The Liquidity Sweep & Absorption Reversal Engine (LSA Engine) is a two-stage reversal tool that separates high-probability liquidity stop-runs from the noise of ordinary breakouts. Most sweep indicators fire the moment price pokes through a swing high or low — the LSA Engine refuses to commit until that sweep is confirmed by genuine institutional absorption.
The problem it solves is simple but expensive: not every wick beyond a prior high or low is a smart-money stop hunt. Many are clean breakouts that keep going. By requiring a volume spike paired with a disproportionately small body (volume that failed to displace price), the engine filters for the specific fingerprint of absorbed liquidity — the moment resting orders are consumed and price is rejected. Only then does it flag a reversal and project the opposing draw.
The result is a clean, dashboard-backed overlay that gives smart-money, ICT, and intraday reversal traders a single source of truth for swept liquidity, absorption status, and the next untaken pool — without the false-signal storm of a raw sweep detector.
🚀 Points of Innovation
- Two-stage validation that pairs a liquidity sweep with a mandatory volume-absorption confirmation — sweeps without absorption are ignored, not flagged.
- Absorption fingerprint defined quantitatively: a volume spike (≥ configurable multiple of average) and a body-to-range ratio below a tunable threshold, so “absorbed” means measured, not eyeballed.
- Dual sweep triggers — a classic close-back-inside rejection or an ATR-scaled displacement break — letting traders tune to rejection-style or momentum-style sweeps on the same instrument.
- Auto-projected opposing draw that targets the nearest untaken opposing liquidity pool, with a structure-based R-multiple fallback when no pool is in range.
- Live dashboard reporting nearest BSL/SSL, volume-spike state, absorption state, and active trigger mode in real time.
- Self-cleaning pool management — swept pools are retired so each level can only fire once, eliminating duplicate signals on the same stop-run.
🔧 Core Components
- Liquidity Pool Engine: Detects confirmed pivot highs and lows and stores them as resting buy-side liquidity (BSL, above) and sell-side liquidity (SSL, below). A rolling buffer keeps only the most relevant active pools per side.
- Sweep Detector: Monitors every active pool for a wick beyond its level, then validates the sweep using the selected trigger — close-back-inside rejection or ATR-scaled displacement.
- Absorption Filter: On the sweeping bar, measures volume against its moving average and the candle’s body-to-range ratio. A spike with a small body = absorbed; this gate can be toggled on or off.
- Projection Module: From each confirmed sweep extreme, projects a dotted target line to the nearest opposing pool or to an R-multiple measured from sweep risk, with a labeled price target.
- Dashboard: A compact on-chart table reporting the nearest BSL/SSL, current volume-spike and absorption state, and the active sweep mode.
🔥 Key Features
- Confirmed reversal signals: Bullish and bearish sweep-plus-absorption triangles fire only on two-stage-validated setups, reducing false stop-run signals.
- Resting liquidity map: Dashed BSL/SSL lines show the live pools price is magnetically drawn to — so you always know where the next sweep is likely.
- Quantitative absorption marker: A yellow circle flags the exact bar where volume spiked while price made minimal progress.
- Projected opposing draw: A dotted line and labeled price target extend from each confirmed sweep to the next opposing pool or R-multiple objective.
- Adaptive trigger mode: Switch between close-back-inside rejection and ATR displacement to match the instrument’s sweep behavior.
- Live status dashboard: Nearest BSL/SSL, volume-spike state, absorption state, and mode at a glance.
- Alerts: Separate alerts for bullish and bearish confirmed sweep-plus-absorption setups.
🎨 Visualization
- Dashed BSL (teal) / SSL (red) lines: resting liquidity pools — price is drawn to these; a sweep of one is the setup precondition.
- Yellow circle: marks the sweeping bar where a volume spike coincided with a small body — the absorption fingerprint.
- Red triangle (BEAR SWEEP) / teal triangle (BULL SWEEP): the confirmed two-stage reversal signal, plotted above/below the triggering bar.
- Dotted target line + price label: the projected opposing draw from the sweep extreme to the next pool or R-multiple target.
- Volume pane + vol-avg line: optional context showing the spike that powered the absorption call.
- Dashboard panel (top-right): nearest BSL/SSL, Vol Spike, Absorption, and Mode cells.
📖 Usage Guidelines
Structure & Liquidity
- Pivot Lookback (L/R) — Default: 8 — Range: 2–50 — Left/right bars used to confirm swing highs and lows. Higher = fewer, more significant pools; lower = more reactive pools.
- Max Active Pools / Side — Default: 6 — Range: 2–20 — How many BSL/SSL levels are tracked per side. More pools = denser map; fewer = cleaner chart.
- Sweep Trigger — Default: Close Back Inside — Options: Close Back Inside / Displacement Break. “Close Back Inside” flags sweeps rejected back under/over the pool (reversal bias). “Displacement Break” flags sweeps that close beyond the pool by an ATR-scaled margin (momentum sweep bias).
- Displacement (× ATR) — Default: 1.2 — Range: 0.1–10 — Only active in Displacement Break mode; sets how far beyond the pool close must travel to qualify.
Absorption Filter
- Require Absorption Confirmation — Default: true — When on, sweeps must pass the absorption gate to fire a signal. Turn off for raw sweep detection.
- Volume Spike (× avg) — Default: 1.6 — Range: 1.0–10 — Minimum volume-to-average ratio on the sweeping bar. Higher = stricter, fewer but higher-quality signals.
- Max Body/Range — Default: 0.45 — Range: 0.05–0.9 — Maximum body-to-range ratio for a bar to count as absorbed. Lower = stricter (volume absorbed with little progress).
- Volume SMA Length — Default: 20 — Range: 1–200 — Lookback for the volume average baseline.
Targets & Projection
- Target R-Multiple — Default: 2.0 — Range: 0.5–20 — Reward multiple used when projecting R-multiple targets.
- Show Projected Draw — Default: true — Toggles the dotted target line and price label.
- Target Type — Default: Opposing Pool — Options: Opposing Pool / R-Multiple. “Opposing Pool” targets the nearest untaken opposite liquidity; “R-Multiple” targets a fixed multiple of sweep risk.
Visuals
- Show Dashboard — Default: true — Toggles the on-chart status panel.
- Signal / pool colors — configurable for bullish, bearish, BSL, and SSL elements.
✅ Best Use Cases
- Smart-money / ICT traders hunting confirmed stop-runs on session highs and lows
- Intraday reversal and fade traders on indices, futures, crypto, and major FX
- Scalpers who need a fast, visual read on whether a sweep is being absorbed or extending
- Liquidity traders who map BSL/SSL and want the next opposing draw projected automatically
- Traders who want to filter breakout-vs-sweep ambiguity with a quantitative absorption gate
⚠️ Limitations
- Absorption relies on volume data; symbols with no/low-quality volume (some FX feeds) will produce fewer or weaker confirmations.
- The body-to-range absorption proxy is an approximation of true order-flow absorption; for delta-grade accuracy pair with a volume-profile/delta source.
- Pivots confirm pivotLen bars after the swing, so pool levels are retrospective — recent extremes may not yet be registered as pools.
- Reversal signals perform best in ranging and liquidity-driven regimes; in strong trending regimes swept levels often continue, so bias signals toward the prevailing trend.
- Like all reversal tools, signals are probabilistic — always manage risk and confirm with broader market structure.
💡 What Makes This Unique
- Absorption as the second stage: Most sweep tools stop at “price went beyond the level.” The LSA Engine demands the institutional fingerprint — volume that failed to move price — before any signal fires.
- Measured, not eyeballed: Absorption is a tunable volume-spike × body/range rule, so the filter is reproducible and adjustable per instrument, not a discretionary call.
- Self-cleaning pools + auto opposing draw: each pool fires once and projects its own target, giving a complete sweep-to-draw narrative on the chart.
🔬 How It Works
- Pool registration: Confirmed swing highs and lows are recorded as resting BSL and SSL pools in a rolling buffer, so the chart always shows the liquidity price is drawn toward.
- Sweep detection: Each bar, the engine checks whether price wicked beyond an active pool and validates it with the selected trigger — a close back inside the pool (rejection) or an ATR-scaled displacement close beyond it.
- Absorption gating: On the sweeping bar, volume is compared to its moving average and the body is compared to the bar’s range. A spike with a small body passes the absorption gate — the signature of consumed resting liquidity that failed to displace price. Swept pools are then retired.
- Signal + projection: A confirmed sweep-plus-absorption prints a directional signal and projects a dotted target to the nearest opposing pool (or an R-multiple objective), while the dashboard updates nearest pools, volume-spike, and absorption state in real time.
💡 Note: For best results, tune Volume Spike and Max Body/Range to your instrument’s typical volume profile — FX and crypto often need a higher spike multiple than index futures. Favor signals aligned with the higher-timeframe trend, and use Opposing Pool targets on ranging instruments and R-Multiple targets on trending ones. This tool is an analytical aid, not financial advice.
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.
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.
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.
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.
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.