OPEN-SOURCE SCRIPT
Liquidity Trap Zones [PhenLabs]

📊 Liquidity Trap Zones [PhenLabs]
Version: PineScript™ v6
📌 Description
The goal of the Liquidity Trap Zones indicator is to try and help traders identify areas where market liquidity appears abundant but is actually thin or artificial, helping traders avoid potential fake outs and false breakouts. This advanced indicator analyzes the relationship between price wicks and volume to detect “mirage” zones where large price movements occur on low volume, indicating potential liquidity traps.
By highlighting these deceptive zones on your charts, the indicator helps traders recognize where institutional players might be creating artificial liquidity to trap retail traders. This enables more informed decision-making and better risk management when approaching key price levels.
🚀 Points of Innovation
🔧 Core Components
🔥 Key Features
🎨 Visualization

📖 Usage Guidelines
Detection Settings
Filter Settings
Display Settings
✅ Best Use Cases
⚠️ Limitations
💡 What Makes This Unique
🔬 How It Works
1. Wick Analysis: Calculates upper and lower wicks for each bar. Normalizes by average bar size to ensure scale independence
2. Mirage Score Calculation: Divides total wick size by volume to identify thin liquidity. Applies EMA smoothing to reduce noise. Scales result for optimal visibility
3. Zone Creation: Triggers when smoothed score crosses threshold. Creates gradient boxes centered on trap bar. Sizes zones based on current ATR for market-appropriate scaling
Version: PineScript™ v6
📌 Description
The goal of the Liquidity Trap Zones indicator is to try and help traders identify areas where market liquidity appears abundant but is actually thin or artificial, helping traders avoid potential fake outs and false breakouts. This advanced indicator analyzes the relationship between price wicks and volume to detect “mirage” zones where large price movements occur on low volume, indicating potential liquidity traps.
By highlighting these deceptive zones on your charts, the indicator helps traders recognize where institutional players might be creating artificial liquidity to trap retail traders. This enables more informed decision-making and better risk management when approaching key price levels.
🚀 Points of Innovation
- Mirage Score Algorithm: Proprietary calculation that normalizes wick size relative to volume and average bar size
- Dynamic Zone Creation: Automatically generates gradient-filled zones at trap locations with ATR-based sizing
- Intelligent Zone Management: Maintains clean charts by limiting displayed zones and auto-updating existing ones
- Scale-Invariant Design: Works across all assets and timeframes with intelligent normalization
- Real-Time Detection: Identifies trap zones as they form, not after the fact
- Volume-Adjusted Analysis: Incorporates tick volume when available for more accurate detection
🔧 Core Components
- Mirage Score Calculator: Analyzes the ratio of price wicks to volume, normalized by average bar size
- ATR-Based Filter: Ensures only significant price movements are considered for trap zone creation
- EMA Smoothing: Reduces noise in the mirage score for clearer signals
- Gradient Zone Renderer: Creates visually distinct zones with multiple opacity levels for better visibility
🔥 Key Features
- Real-Time Trap Detection: Identifies liquidity mirages as they develop during live trading
- Dynamic Zone Sizing: Adjusts zone height based on current market volatility (ATR)
- Smart Zone Management: Automatically maintains a clean chart by limiting the number of displayed zones
- Customizable Sensitivity: Fine-tune detection parameters for different market conditions
- Visual Clarity: Gradient-filled zones with distinct borders for easy identification
- Status Line Display: Shows current mirage score and threshold for quick reference
🎨 Visualization
- Gradient Trap Zones: Purple gradient boxes with darker centers indicating trap strength
- Mirage Score Line: Orange line in status area showing current liquidity quality
- Threshold Reference: Gray line showing your configured detection threshold
- Extended Zone Display: Zones automatically extend forward as new bars form
📖 Usage Guidelines
Detection Settings
- Smoothing Length (EMA) - Default: 10 - Range: 1-50 - Description: Controls responsiveness of mirage score. Lower values make detection more sensitive to recent price action
- Mirage Threshold - Default: 5.0 - Range: 0.1-20.0 - Description: Score above this level triggers trap zone creation. Higher values reduce false positives but may miss subtle traps
Filter Settings
- ATR Length for Range Filter - Default: 14 - Range: 1-50 - Description: Period for volatility calculation. Standard 14 works well for most timeframes
- ATR Multiplier - Default: 1.0 - Range: 0.0-5.0 - Description: Minimum bar range as multiple of ATR. Higher values filter out smaller moves
Display Settings
- Zone Height Multiplier - Default: 0.5 - Range: 0.1-2.0 - Description: Controls trap zone height relative to ATR. Adjust for visual preference
- Max Trap Zones - Default: 5 - Range: 1-20 - Description: Maximum zones displayed before oldest are removed. Balance clarity vs. history
✅ Best Use Cases
- Identifying potential fakeout levels before entering trades
- Confirming support/resistance quality by checking for liquidity traps
- Avoiding stop-loss placement in trap zones where sweeps are likely
- Timing entries after trap zones are cleared
- Scalping opportunities when price approaches known trap zones
⚠️ Limitations
- Requires volume data - less effective on instruments without reliable volume
- May generate false signals during news events or genuine volume spikes
- Not a standalone system - combine with price action and other indicators
- Zone creation is based on historical data - future price behavior not guaranteed
💡 What Makes This Unique
- First indicator to specifically target liquidity mirages using wick-to-volume analysis
- Proprietary normalization ensures consistent performance across all markets
- Visual gradient design makes trap zones immediately recognizable
- Combines multiple volatility and volume metrics for robust detection
🔬 How It Works
1. Wick Analysis: Calculates upper and lower wicks for each bar. Normalizes by average bar size to ensure scale independence
2. Mirage Score Calculation: Divides total wick size by volume to identify thin liquidity. Applies EMA smoothing to reduce noise. Scales result for optimal visibility
3. Zone Creation: Triggers when smoothed score crosses threshold. Creates gradient boxes centered on trap bar. Sizes zones based on current ATR for market-appropriate scaling
💡 Note: Liquidity Trap Zones works best when combined with traditional support/resistance analysis and volume profile indicators. The zones highlight areas of deceptive liquidity but should not be the sole factor in trading decisions. Always use proper risk management and confirm signals with price action.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Smart Tools for Smarter Trades: 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.
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Smart Tools for Smarter Trades: 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.
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。