OPEN-SOURCE SCRIPT
Liquidity Void Zone Detector [PhenLabs]

📊 Liquidity Void Zone Detector [PhenLabs]
Version: PineScript™v6
📌 Description
The Liquidity Void Zone Detector is a sophisticated technical indicator designed to identify and visualize areas where price moved with abnormally low volume or rapid momentum, creating "voids" in market liquidity. These zones represent areas where insufficient trading activity occurred during price movement, often acting as magnets for future price action as the market seeks to fill these gaps.
Built on PineScript v6, this indicator employs a dual-detection methodology that analyzes both volume depletion patterns and price movement intensity relative to ATR. The revolutionary 3D visualization system uses three-layer polyline rendering with adaptive transparency and vertical offsets, creating genuine depth perception where low liquidity zones visually recede and high liquidity zones protrude forward. This makes critical market structure immediately apparent without cluttering your chart.
🚀 Points of Innovation
🔧 Core Components

🔥 Key Features
🎨 Visualization
📖 Usage Guidelines
Detection Settings
Visual Settings
✅ Best Use Cases
⚠️ Limitations
💡 What Makes This Unique
🔬 How It Works
Phase 1: Real-Time Detection
Phase 2: Void Tracking & Qualification
Phase 3: 3D Visualization Construction
Phase 4: Memory Management & Display
💡 Note:
This indicator is designed to enhance your market structure analysis by revealing liquidity characteristics that aren’t visible through standard price and volume displays. For best results, combine void detection with your existing support/resistance analysis, trend identification, and risk management framework. Liquidity voids are descriptive of past market behavior and should inform positioning decisions rather than serve as standalone entry/exit signals. Experiment with detection parameters across different timeframes to find settings that align with your trading style and instrument characteristics.
Version: PineScript™v6
📌 Description
The Liquidity Void Zone Detector is a sophisticated technical indicator designed to identify and visualize areas where price moved with abnormally low volume or rapid momentum, creating "voids" in market liquidity. These zones represent areas where insufficient trading activity occurred during price movement, often acting as magnets for future price action as the market seeks to fill these gaps.
Built on PineScript v6, this indicator employs a dual-detection methodology that analyzes both volume depletion patterns and price movement intensity relative to ATR. The revolutionary 3D visualization system uses three-layer polyline rendering with adaptive transparency and vertical offsets, creating genuine depth perception where low liquidity zones visually recede and high liquidity zones protrude forward. This makes critical market structure immediately apparent without cluttering your chart.
🚀 Points of Innovation
- Dual detection algorithm combining volume threshold analysis and ATR-normalized price movement sensitivity for comprehensive void identification
- Three-layer 3D visualization system with progressive transparency gradients (85%, 78%, 70%) and calculated vertical offsets for authentic depth perception
- Intelligent state machine logic that tracks consecutive void bars and only renders zones meeting minimum qualification requirements
- Dynamic strength scoring system (0-100 scale) that combines inverted volume ratios with movement intensity for accurate void characterization
- Adaptive ATR-based spacing calculation that automatically adjusts 3D layering depth to match instrument volatility
- Efficient memory management system supporting up to 100 simultaneous void visualizations with automatic array-based cleanup
🔧 Core Components
- Volume Analysis Engine: Calculates rolling volume averages and compares current bar volume against dynamic thresholds to detect abnormally thin trading conditions
- Price Movement Analyzer: Normalizes bar range against ATR to identify rapid price movements that indicate liquidity exhaustion regardless of instrument or timeframe
- Void Tracking State Machine: Maintains persistent tracking of void start bars, price boundaries, consecutive bar counts, and cumulative strength across multiple bars
- 3D Polyline Renderer: Generates three-layer rectangular polylines with precise timestamp-to-bar index conversion and progressive offset calculations
- Strength Calculation System: Combines volume component (inverted ratio capped at 100) with movement component (ATR intensity × 30) for comprehensive void scoring
🔥 Key Features
- Automatic Void Detection: Continuously scans price action for low volume conditions or rapid movements, triggering void tracking when thresholds are exceeded
- Real-Time Visualization: Creates 3D rectangular zones spanning from void initiation to termination, with color-coded depth indicating liquidity type
- Adjustable Sensitivity: Configure volume threshold multiplier (0.1-2.0x), price movement sensitivity (0.5-5.0x), and minimum qualifying bars (1-10) for customized detection
- Dual Color Coding: Separate visual treatment for low liquidity voids (receding red) and high liquidity zones (protruding green) based on 50-point strength threshold
- Optional Compact Labels: Toggle LV (Low Volume) or HV (High Volume) circular labels at void centers for quick identification without visual clutter
- Lookback Period Control: Adjust analysis window from 5 to 100 bars to match your trading timeframe and market volatility characteristics
- Memory-Efficient Design: Automatically manages polyline and label arrays, deleting oldest elements when user-defined maximum is reached
- Data Window Integration: Plots void detection binary, current strength score, and average volume for detailed analysis in TradingView's data window
🎨 Visualization
- Three-Layer Depth System: Each void is rendered as three stacked polylines with progressive transparency (85%, 78%, 70%) and calculated vertical offsets creating authentic 3D appearance
- Directional Depth Perception: Low liquidity zones recede with back layer most transparent; high liquidity zones protrude with front layer most transparent for instant visual differentiation
- Adaptive Offset Spacing: Vertical separation between layers calculated as ATR(14) × 0.001, ensuring consistent 3D effect across different instruments and volatility regimes
- Color Customization: Fully configurable base colors for both low liquidity zones (default: red with 80 transparency) and high liquidity zones (default: green with 80 transparency)
- Minimal Chart Clutter: Closed polylines with matching line and fill colors create clean rectangular zones without unnecessary borders or visual noise
- Background Highlight: Subtle yellow background (96% transparency) marks bars where void conditions are actively detected in real-time
- Compact Labeling: Optional tiny circular labels with 60% transparent backgrounds positioned at void center points for quick reference
📖 Usage Guidelines
Detection Settings
- Lookback Period: Default: 10 | Range: 5-100 | Number of bars analyzed for volume averaging and void detection. Lower values increase sensitivity to recent changes; higher values smooth detection across longer timeframes. Adjust based on your trading timeframe: short-term traders use 5-15, swing traders use 20-50, position traders use 50-100.
- Volume Threshold: Default: 1.0 | Range: 0.1-2.0 (step 0.1) | Multiplier applied to average volume. Bars with volume below (average × threshold) trigger void conditions. Lower values detect only extreme volume depletion; higher values capture more moderate low-volume situations. Start with 1.0 and decrease to 0.5-0.7 for stricter detection.
- Price Movement Sensitivity: Default: 1.5 | Range: 0.5-5.0 (step 0.1) | Multiplier for ATR-normalized price movement detection. Values above this threshold indicate rapid price changes suggesting liquidity voids. Increase to 2.0-3.0 for volatile instruments; decrease to 0.8-1.2 for ranging or low-volatility conditions.
- Minimum Void Bars: Default: 10 | Range: 1-10 | Minimum consecutive bars exhibiting void conditions required before visualization is created. Filters out brief anomalies and ensures only sustained voids are displayed. Use 1-3 for scalping, 5-10 for intraday trading, 10+ for swing trading to match your time horizon.
Visual Settings
- Low Liquidity Color: Default: Red (80% transparent) | Base color for zones where volume depletion or rapid movement indicates thin liquidity. These zones recede visually (back layer most transparent). Choose colors that contrast with your chart theme for optimal visibility.
- High Liquidity Color: Default: Green (80% transparent) | Base color for zones with relatively higher liquidity compared to void threshold. These zones protrude visually (front layer most transparent). Ensure clear differentiation from low liquidity color.
- Show Void Labels: Default: True | Toggle display of compact LV/HV labels at void centers. Disable for cleaner charts when trading; enable for analysis and review to quickly identify void types across your chart.
- Max Visible Voids: Default: 50 | Range: 10-100 | Maximum number of void visualizations kept on chart. Each void uses 3 polylines, so setting of 50 maintains 150 total polylines. Higher values preserve more history but may impact performance on lower-end systems.
✅ Best Use Cases
- Gap Fill Trading: Identify unfilled liquidity voids that price frequently returns to, providing high-probability retest and reversal opportunities when price approaches these zones
- Breakout Validation: Distinguish genuine breakouts through established liquidity from false breaks into void zones that lack sustainable volume support
- Support/Resistance Confluence: Layer void detection over key horizontal levels to validate structural integrity—levels within high liquidity zones are stronger than those in voids
- Trend Continuation: Monitor for new void formation in trend direction as potential continuation zones where price may accelerate due to reduced resistance
- Range Trading: Identify void zones within consolidation ranges that price tends to traverse quickly, helping to avoid getting caught in rapid moves through thin areas
- Entry Timing: Wait for price to reach void boundaries rather than entering mid-void, as voids tend to be traversed quickly with limited profit-taking opportunities
⚠️ Limitations
- Historical Pattern Indicator: Identifies past liquidity voids but cannot predict whether price will return to fill them or when filling might occur
- No Volume on Forex: Indicator uses tick volume for forex pairs, which approximates but doesn't represent true trading volume, potentially affecting detection accuracy
- Lagging Confirmation: Requires minimum consecutive bars (default 10) before void is visualized, meaning detection occurs after void formation begins
- Trending Market Behavior: Strong trends driven by fundamental catalysts may create voids that remain unfilled for extended periods or permanently
- Timeframe Dependency: Detection sensitivity varies significantly across timeframes; settings optimized for one timeframe may not perform well on others
- No Directional Bias: Indicator identifies liquidity characteristics but provides no predictive signal for price direction after void detection
- Performance Considerations: Higher max visible void settings combined with small minimum void bars can generate numerous visualizations impacting chart rendering speed
💡 What Makes This Unique
- Industry-First 3D Visualization: Unlike flat volume or liquidity indicators, the three-layer rendering with directional depth perception provides instant visual hierarchy of liquidity quality
- Dual-Mode Detection: Combines both volume-based and movement-based detection methodologies, capturing voids that single-approach indicators miss
- Intelligent Qualification System: State machine logic prevents premature visualization by requiring sustained void conditions, reducing false signals and chart clutter
- ATR-Normalized Analysis: All detection thresholds adapt to instrument volatility, ensuring consistent performance across stocks, forex, crypto, and futures without constant recalibration
- Transparency-Based Depth: Uses progressive transparency gradients rather than colors or patterns to create depth, maintaining visual clarity while conveying information hierarchy
- Comprehensive Strength Metrics: 0-100 void strength calculation considers both the degree of volume depletion and the magnitude of price movement for nuanced zone characterization
🔬 How It Works
Phase 1: Real-Time Detection
- On each bar close, the indicator calculates average volume over the lookback period and compares current bar volume against the volume threshold multiplier
- Simultaneously measures current bar's high-low range and normalizes it against ATR, comparing the result to price movement sensitivity parameter
- If either volume falls below threshold OR movement exceeds sensitivity threshold, the bar is flagged as exhibiting void characteristics
Phase 2: Void Tracking & Qualification
- When void conditions first appear, state machine initializes tracking variables: start bar index, initial top/bottom prices, consecutive bar counter, and cumulative strength accumulator
- Each subsequent bar with void conditions extends the tracking, updating price boundaries to envelope all bars and accumulating strength scores
- When void conditions cease, system checks if consecutive bar count meets minimum threshold; if yes, proceeds to visualization; if no, discards the tracking and resets
Phase 3: 3D Visualization Construction
- Calculates average void strength by dividing cumulative strength by number of bars, then determines if void is low liquidity (>50 strength) or high liquidity (≤50 strength)
- Generates three polyline layers spanning from start bar to end bar and from top price to bottom price, each with calculated vertical offset based on ATR
- Applies progressive transparency (85%, 78%, 70%) with layer ordering creating recession effect for low liquidity zones and protrusion effect for high liquidity zones
- Creates optional center label and pushes all visual elements into arrays for memory management
Phase 4: Memory Management & Display
- Continuously monitors polyline array size (each void creates 3 polylines); when total exceeds max visible voids × 3, deletes oldest polylines via array.shift()
- Similarly manages label array, removing oldest labels when count exceeds maximum to prevent memory accumulation over extended chart history
- Plots diagnostic data to TradingView’s data window (void detection binary, current strength, average volume) for detailed analysis without cluttering main chart
💡 Note:
This indicator is designed to enhance your market structure analysis by revealing liquidity characteristics that aren’t visible through standard price and volume displays. For best results, combine void detection with your existing support/resistance analysis, trend identification, and risk management framework. Liquidity voids are descriptive of past market behavior and should inform positioning decisions rather than serve as standalone entry/exit signals. Experiment with detection parameters across different timeframes to find settings that align with your trading style and instrument characteristics.
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.
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.
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.
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.
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.