OPEN-SOURCE SCRIPT
Liquidity Phantom [JOAT]

Liquidity Phantom [JOAT]
Introduction
The Liquidity Phantom is an advanced open-source liquidity mapping and order flow dynamics engine that reveals where institutional money sits, how it moves, and when it strikes. It tracks unswept swing highs and lows as liquidity pools, detects phantom sweeps (institutional stop hunts), maps liquidity voids where price teleported through ranges without trading, measures gravitational pull toward nearby pools, identifies absorption pulses where passive orders absorb aggressive flow, and detects multi-factor exhaustion at price extremes. Every feature is built around a single thesis: liquidity is the invisible architecture of the market, and mapping it gives traders an edge that price action alone cannot provide.
The indicator overlays directly on the price chart with dashed liquidity pool levels, sweep boxes, void ghost boxes, absorption labels, exhaustion markers, liquidity density candles, and phantom drift lines — all managed with array-based cleanup and cooldown logic to keep the chart readable.

Why This Indicator Exists
Institutional traders do not chase price — they hunt liquidity. Every swing high has stop-loss orders sitting above it (sell-side liquidity). Every swing low has stop-loss orders sitting below it (buy-side liquidity). Institutions need this liquidity to fill their large orders without excessive slippage. Understanding where liquidity pools form, which ones have been swept, and where voids exist in price delivery gives traders a map of institutional intent.
Most indicators focus on what price has done. The Liquidity Phantom focuses on where the money is waiting to be taken. It addresses questions that standard indicators cannot answer:
Feature 1: Liquidity Pool Tracker
The foundation of the indicator. Every confirmed swing high is mapped as a sell-side liquidity pool (dashed line extending right, labeled "SELL LIQ" with the price). Every confirmed swing low is mapped as a buy-side liquidity pool (labeled "BUY LIQ"). These represent areas where retail stop-loss orders cluster — and where institutions will eventually hunt.
Swing detection uses an oscillator-based method with a configurable length (default 10 bars). Pools are tracked in arrays and automatically cleaned up when the maximum pool count is reached (default 20), with the oldest pools removed first.
Each pool level extends to the right as a dashed line until it is swept. The visual effect is a map of all unswept liquidity levels above and below price — the "phantom" architecture that drives institutional decision-making.
Feature 2: Phantom Sweep Detector
When price wicks through a liquidity pool level and closes back on the other side, it is a phantom sweep — institutional stop hunting in action. The indicator detects these events with two confirmation filters:
When a sweep is confirmed:
Bullish sweeps (price wicks below a buy-side pool and closes above) are colored in amber-orange. Bearish sweeps (price wicks above a sell-side pool and closes below) are colored in ember-red.
Feature 3: Liquidity Void Mapper
A liquidity void occurs when price makes a large single-candle move (body exceeding a configurable ATR multiple, default 1.5x) — the market "teleported" through a range without meaningful trading. These voids represent areas of inefficient price delivery that the market tends to revisit.
Voids are drawn as ghost boxes with dotted borders in a deep indigo color. The indicator tracks whether each void has been filled (price has returned to trade through the void range). Filled voids change color to a teal shade, providing a visual record of which voids have been revisited and which remain open.
The dashboard tracks total void count and fill count, giving a void fill rate that indicates whether the market is efficiently filling its delivery gaps or leaving them open (a sign of strong trending).
Feature 4: Gravity Index
The Gravity Index measures how strongly price is being "pulled" toward nearby liquidity pools. It calculates an inverse-distance-weighted sum of all pools within 5 ATR of current price. The closer and more numerous the pools, the higher the gravity score.
The gravity score is displayed as a subtle background color that intensifies as gravity increases, creating a visual "heat map" of liquidity density around price.
Feature 5: Absorption Pulse
Absorption occurs when large volume meets a liquidity pool but price barely moves — the classic sign of passive institutional orders absorbing aggressive flow. The indicator detects absorption using three simultaneous conditions:
When all three conditions align, an absorption label appears ("BUY ABSORB" or "SELL ABSORB") with the volume multiple. These are among the most valuable signals the indicator produces — they reveal the "invisible hand" of institutional passive orders that cannot be seen on a standard chart.
Feature 6: Exhaustion Spectra
Multi-factor exhaustion detection at price extremes. The indicator scores four exhaustion factors independently:
When three or more factors align (3/4 or 4/4), an "EXHAUSTION" label appears with the factor count. These are rare, high-conviction reversal signals that mark the point where institutional displacement has peaked and multiple independent measures confirm the extreme.
Feature 7: Liquidity Density Candles
Candles are colored based on how many liquidity pools exist within 5 ATR of current price. More pools nearby produce brighter, more vibrant ultraviolet candles. Fewer pools produce darker, slate-colored candles. This creates a unique heatmap effect that shows liquidity-rich zones (bright) versus liquidity-dry zones (dark) at a glance.
The coloring uses color.from_gradient() mapped to the gravity score, with separate palettes for bullish and bearish candles.
Feature 8: Phantom Drift Lines
The indicator projects where liquidity is "migrating" by calculating the average price of recent high pools and low pools, then drawing a line at the midpoint — the liquidity gravity center. This drift line shows the central tendency of where institutional interest is concentrated and how it shifts over time.
12-Row Dashboard

Input Parameters
Liquidity Engine:
Features:
How to Use This Indicator
Step 1: Map the Liquidity Landscape
Identify where unswept pools sit above and below price. These are the targets that institutions will eventually hunt.
Step 2: Watch for Phantom Sweeps
When a pool gets swept (wick through + close back), the stop hunt is complete. The sweep direction often signals the true institutional intent — a bearish sweep of highs followed by a close below often precedes a downward move.
Step 3: Monitor Gravity
High gravity (multiple pools nearby) means price is in a liquidity-rich zone where reactions are likely. Low gravity means price is in clean territory where trends can extend.
Step 4: Identify Absorption
Absorption pulses near liquidity pools are among the strongest signals. High volume + small body + near a pool = passive institutional orders absorbing the flow. The direction of the absorption candle hints at which side the institution is on.
Step 5: Respect Exhaustion
When 3+ exhaustion factors align, the current move is overextended by multiple independent measures. These are high-conviction reversal zones — not guaranteed reversals, but areas where the probability of a pullback is elevated.
Step 6: Use Voids as Targets
Unfilled voids act as magnets. When price is trending toward an open void, expect it to fill. The void fill rate in the dashboard tells you whether the market is efficiently filling gaps or leaving them open.
Limitations
Originality Statement
This indicator is original in its comprehensive liquidity-centric approach to market analysis. While swing detection and basic sweep concepts exist in other scripts, this indicator is justified because:
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Liquidity analysis reveals where stop orders likely cluster based on market structure. It does not access actual order book data and cannot confirm the presence or absence of real orders at any level. Sweep signals, absorption pulses, and exhaustion markers are probabilistic observations, not certainties.
Always use proper risk management. Never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Introduction
The Liquidity Phantom is an advanced open-source liquidity mapping and order flow dynamics engine that reveals where institutional money sits, how it moves, and when it strikes. It tracks unswept swing highs and lows as liquidity pools, detects phantom sweeps (institutional stop hunts), maps liquidity voids where price teleported through ranges without trading, measures gravitational pull toward nearby pools, identifies absorption pulses where passive orders absorb aggressive flow, and detects multi-factor exhaustion at price extremes. Every feature is built around a single thesis: liquidity is the invisible architecture of the market, and mapping it gives traders an edge that price action alone cannot provide.
The indicator overlays directly on the price chart with dashed liquidity pool levels, sweep boxes, void ghost boxes, absorption labels, exhaustion markers, liquidity density candles, and phantom drift lines — all managed with array-based cleanup and cooldown logic to keep the chart readable.
Why This Indicator Exists
Institutional traders do not chase price — they hunt liquidity. Every swing high has stop-loss orders sitting above it (sell-side liquidity). Every swing low has stop-loss orders sitting below it (buy-side liquidity). Institutions need this liquidity to fill their large orders without excessive slippage. Understanding where liquidity pools form, which ones have been swept, and where voids exist in price delivery gives traders a map of institutional intent.
Most indicators focus on what price has done. The Liquidity Phantom focuses on where the money is waiting to be taken. It addresses questions that standard indicators cannot answer:
- Where are the nearest unswept liquidity pools above and below current price?
- Has a pool just been swept (stop hunt completed)?
- Are there voids in price delivery that act as magnets for future price action?
- Is there absorption happening — large volume meeting price with minimal movement, indicating passive institutional orders?
- Is the current move exhausting — multiple factors aligning at an extreme that suggests reversal?
- How dense is the liquidity environment around current price?
Feature 1: Liquidity Pool Tracker
The foundation of the indicator. Every confirmed swing high is mapped as a sell-side liquidity pool (dashed line extending right, labeled "SELL LIQ" with the price). Every confirmed swing low is mapped as a buy-side liquidity pool (labeled "BUY LIQ"). These represent areas where retail stop-loss orders cluster — and where institutions will eventually hunt.
Swing detection uses an oscillator-based method with a configurable length (default 10 bars). Pools are tracked in arrays and automatically cleaned up when the maximum pool count is reached (default 20), with the oldest pools removed first.
Each pool level extends to the right as a dashed line until it is swept. The visual effect is a map of all unswept liquidity levels above and below price — the "phantom" architecture that drives institutional decision-making.
Feature 2: Phantom Sweep Detector
When price wicks through a liquidity pool level and closes back on the other side, it is a phantom sweep — institutional stop hunting in action. The indicator detects these events with two confirmation filters:
- Wick Threshold: The wick beyond the pool level must exceed a configurable ATR multiple (default 0.5x ATR). This ensures the sweep was significant, not just a tiny wick touching the level.
- Cooldown: After a sweep signal fires, no new sweep can fire for a configurable number of bars (default 15). This prevents signal stacking on the same event.
When a sweep is confirmed:
- The swept pool's dashed line and label are removed from the chart
- A colored sweep box is drawn around the sweep candle
- A "PHANTOM SWEEP" label appears with the swept price level
- The sweep is counted in the dashboard (total bull sweeps / bear sweeps)
Bullish sweeps (price wicks below a buy-side pool and closes above) are colored in amber-orange. Bearish sweeps (price wicks above a sell-side pool and closes below) are colored in ember-red.
Feature 3: Liquidity Void Mapper
A liquidity void occurs when price makes a large single-candle move (body exceeding a configurable ATR multiple, default 1.5x) — the market "teleported" through a range without meaningful trading. These voids represent areas of inefficient price delivery that the market tends to revisit.
Voids are drawn as ghost boxes with dotted borders in a deep indigo color. The indicator tracks whether each void has been filled (price has returned to trade through the void range). Filled voids change color to a teal shade, providing a visual record of which voids have been revisited and which remain open.
The dashboard tracks total void count and fill count, giving a void fill rate that indicates whether the market is efficiently filling its delivery gaps or leaving them open (a sign of strong trending).
Feature 4: Gravity Index
The Gravity Index measures how strongly price is being "pulled" toward nearby liquidity pools. It calculates an inverse-distance-weighted sum of all pools within 5 ATR of current price. The closer and more numerous the pools, the higher the gravity score.
- EXTREME (7+): Price is very close to multiple pools — high probability of a sweep or significant reaction
- HIGH (4-7): Several pools nearby — increased likelihood of liquidity-driven moves
- MODERATE (2-4): Some pools in the vicinity — normal conditions
- LOW (0-2): Few pools nearby — price is in clean territory
The gravity score is displayed as a subtle background color that intensifies as gravity increases, creating a visual "heat map" of liquidity density around price.
Feature 5: Absorption Pulse
Absorption occurs when large volume meets a liquidity pool but price barely moves — the classic sign of passive institutional orders absorbing aggressive flow. The indicator detects absorption using three simultaneous conditions:
- Volume exceeds the configurable threshold (default 1.8x the 20-bar average)
- The candle body is small relative to the full range (wick ratio below 35%)
- Price is near a liquidity pool (within 1.5 ATR)
When all three conditions align, an absorption label appears ("BUY ABSORB" or "SELL ABSORB") with the volume multiple. These are among the most valuable signals the indicator produces — they reveal the "invisible hand" of institutional passive orders that cannot be seen on a standard chart.
Feature 6: Exhaustion Spectra
Multi-factor exhaustion detection at price extremes. The indicator scores four exhaustion factors independently:
- Price extended beyond Bollinger Bands (overextension)
- Volume climax (exceeding 2x average)
- RSI at extreme levels (above 75 or below 25)
- Proximity to a liquidity pool in the direction of the move
When three or more factors align (3/4 or 4/4), an "EXHAUSTION" label appears with the factor count. These are rare, high-conviction reversal signals that mark the point where institutional displacement has peaked and multiple independent measures confirm the extreme.
Feature 7: Liquidity Density Candles
Candles are colored based on how many liquidity pools exist within 5 ATR of current price. More pools nearby produce brighter, more vibrant ultraviolet candles. Fewer pools produce darker, slate-colored candles. This creates a unique heatmap effect that shows liquidity-rich zones (bright) versus liquidity-dry zones (dark) at a glance.
The coloring uses color.from_gradient() mapped to the gravity score, with separate palettes for bullish and bearish candles.
Feature 8: Phantom Drift Lines
The indicator projects where liquidity is "migrating" by calculating the average price of recent high pools and low pools, then drawing a line at the midpoint — the liquidity gravity center. This drift line shows the central tendency of where institutional interest is concentrated and how it shifts over time.
12-Row Dashboard
- Row 1: Gravity Index score and classification
- Row 2: Nearest pool direction and distance in ATR
- Row 3: Active pool count (high pools + low pools)
- Row 4: Last sweep direction and bars ago
- Row 5: Total sweeps (bull + bear counts)
- Row 6: Void count and fill rate
- Row 7: Absorption pulse count
- Row 8: Exhaustion count
- Row 9: Nearby pool density (pools within 5 ATR)
- Row 10: Current candle volume ratio
- Row 11: RSI value for exhaustion context
- Row 12: Drift line position
Input Parameters
Liquidity Engine:
- Swing Detection Length (default 10) — sensitivity of pool detection
- Max Liquidity Pools (default 20) — how many pools to track simultaneously
- Sweep Wick Threshold (default 0.5 ATR) — minimum wick size for sweep confirmation
- Absorption Volume Threshold (default 1.8x) — minimum volume for absorption detection
- Void Min Size (default 1.5 ATR) — minimum candle body for void detection
Features:
- Toggles for Liquidity Pool Levels, Phantom Sweep Signals, Liquidity Void Boxes, Absorption Pulse Labels, Exhaustion Spectra, Liquidity Density Candles, Phantom Drift Lines
- Signal Cooldown (default 15 bars)
How to Use This Indicator
Step 1: Map the Liquidity Landscape
Identify where unswept pools sit above and below price. These are the targets that institutions will eventually hunt.
Step 2: Watch for Phantom Sweeps
When a pool gets swept (wick through + close back), the stop hunt is complete. The sweep direction often signals the true institutional intent — a bearish sweep of highs followed by a close below often precedes a downward move.
Step 3: Monitor Gravity
High gravity (multiple pools nearby) means price is in a liquidity-rich zone where reactions are likely. Low gravity means price is in clean territory where trends can extend.
Step 4: Identify Absorption
Absorption pulses near liquidity pools are among the strongest signals. High volume + small body + near a pool = passive institutional orders absorbing the flow. The direction of the absorption candle hints at which side the institution is on.
Step 5: Respect Exhaustion
When 3+ exhaustion factors align, the current move is overextended by multiple independent measures. These are high-conviction reversal zones — not guaranteed reversals, but areas where the probability of a pullback is elevated.
Step 6: Use Voids as Targets
Unfilled voids act as magnets. When price is trending toward an open void, expect it to fill. The void fill rate in the dashboard tells you whether the market is efficiently filling gaps or leaving them open.
Limitations
- Liquidity pool detection is based on swing highs and lows, which are lagging by the swing detection length. Pools appear after the swing is confirmed, not in real-time.
- Not all swing highs/lows have significant stop-loss orders above/below them. The indicator maps potential liquidity based on structure, not actual order book data.
- Absorption detection uses volume and body ratio as proxies for passive institutional orders. True absorption can only be confirmed with Level 2 order book data, which is not available in Pine Script.
- Exhaustion signals are intentionally rare (require 3+ factors). In fast-moving markets, exhaustion may not fire before a reversal occurs.
- Volume data quality varies by instrument. Forex tick volume approximates but does not equal true institutional volume.
- Phantom sweeps can be false signals — sometimes price sweeps a level and continues in the sweep direction rather than reversing.
- The indicator maps historical and current liquidity dynamics. It does not predict which pool will be swept next or when.
Originality Statement
This indicator is original in its comprehensive liquidity-centric approach to market analysis. While swing detection and basic sweep concepts exist in other scripts, this indicator is justified because:
- It treats liquidity pools as tracked entities with full lifecycle management (creation at swing detection, extension as dashed levels, removal on sweep, with array-based cleanup)
- The Phantom Sweep Detector uses dual filtering (ATR wick threshold + cooldown) for precision that basic "price crossed level" detection lacks
- The Liquidity Void Mapper tracks gaps in price delivery with fill monitoring — a concept distinct from Fair Value Gaps, focused on single-candle delivery failures
- The Gravity Index provides a quantitative measure of liquidity pull that no standard indicator offers — inverse-distance-weighted scoring of all nearby pools
- Absorption Pulse detection combines volume analysis, body ratio, and pool proximity to identify passive institutional orders — a multi-factor approach not available in standard volume indicators
- Exhaustion Spectra uses four independent factors (BB extension, volume climax, RSI extreme, pool proximity) for high-conviction reversal detection
- Liquidity Density Candles create a unique heatmap visualization based on pool concentration rather than any price-based metric
- The combination of pool tracking, sweep detection, void mapping, gravity scoring, absorption detection, exhaustion spectra, density candles, and drift lines creates a unified liquidity analysis system not available in any single existing indicator
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Liquidity analysis reveals where stop orders likely cluster based on market structure. It does not access actual order book data and cannot confirm the presence or absence of real orders at any level. Sweep signals, absorption pulses, and exhaustion markers are probabilistic observations, not certainties.
Always use proper risk management. Never risk more than you can afford to lose. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน