OPEN-SOURCE SCRIPT
已更新 FVG_SWG

FVG Liquidity & Gaps is a high-performance technical analysis tool built on the principles of Smart Money Concepts (SMC). This script integrates a dual-layer visualization system to track institutional order flow by identifying extreme liquidity zones (Swings) and price imbalances (Fair Value Gaps) in a single, unified panel.
The standout feature of this tool is its Dynamic Mitigation Engine, which physically resizes imbalance boxes as price interacts with them, providing a real-time view of remaining unfilled liquidity.
Key Features:
1. Liquidity Swings with Volume Analysis
Automatic Detection: Instantly identifies significant fractal highs and lows (Pivot High/Low).
Quantitative Insights: Each liquidity level includes a label displaying the Accumulated Volume or Touch Count within that zone. This helps traders distinguish between "weak" retail levels and "high-conviction" institutional walls.
Dynamic Projections: Liquidity lines remain solid while active and transition to a dashed style once the level is "purged" (swept), maintaining a clean structural history of the market.
2. Intelligent Fair Value Gaps (FVG)
Imbalance Visualization: Automatically detects and plots Bullish and Bearish Fair Value Gaps.
Mitigation Reduction (isFvgReduce): This "pro-level" feature automatically shrinks the FVG boxes as price fills the gap. If a wick enters 50% of an FVG, the box resizes to show only the remaining 50% that is yet to be mitigated.
Optimized Memory: Includes a history manager to limit the number of active gaps, ensuring the chart remains focused on the most relevant current action.
How to Trade with this Script:
Liquidity Sweeps (Stop Hunts): Monitor the Swing levels for potential sweeps. When price breaks a high-volume liquidity line and quickly rejects, it provides a high-probability reversal signal.
Order Block & Inefficiency Entry: Use the unfilled (or partially reduced) FVG boxes as targets or entry zones where the market is likely to seek balance.
Noise Filtering: Adjust the Filter Min Value to only display labels on liquidity levels that have seen significant trading activity—ideal for high-volatility assets like Nasdaq (NAS100), Gold (XAUUSD), or Crypto.
Technical Configuration:
Pivot Lookback: Define the sensitivity of market structure.
Swing Area: Choose between measuring only the mecha (Wick Extremity) or the Full Range for liquidity volume calculations.
Custom Aesthetics: Fully customizable colors to match any UI theme (Dark/Light modes).
The standout feature of this tool is its Dynamic Mitigation Engine, which physically resizes imbalance boxes as price interacts with them, providing a real-time view of remaining unfilled liquidity.
Key Features:
1. Liquidity Swings with Volume Analysis
Automatic Detection: Instantly identifies significant fractal highs and lows (Pivot High/Low).
Quantitative Insights: Each liquidity level includes a label displaying the Accumulated Volume or Touch Count within that zone. This helps traders distinguish between "weak" retail levels and "high-conviction" institutional walls.
Dynamic Projections: Liquidity lines remain solid while active and transition to a dashed style once the level is "purged" (swept), maintaining a clean structural history of the market.
2. Intelligent Fair Value Gaps (FVG)
Imbalance Visualization: Automatically detects and plots Bullish and Bearish Fair Value Gaps.
Mitigation Reduction (isFvgReduce): This "pro-level" feature automatically shrinks the FVG boxes as price fills the gap. If a wick enters 50% of an FVG, the box resizes to show only the remaining 50% that is yet to be mitigated.
Optimized Memory: Includes a history manager to limit the number of active gaps, ensuring the chart remains focused on the most relevant current action.
How to Trade with this Script:
Liquidity Sweeps (Stop Hunts): Monitor the Swing levels for potential sweeps. When price breaks a high-volume liquidity line and quickly rejects, it provides a high-probability reversal signal.
Order Block & Inefficiency Entry: Use the unfilled (or partially reduced) FVG boxes as targets or entry zones where the market is likely to seek balance.
Noise Filtering: Adjust the Filter Min Value to only display labels on liquidity levels that have seen significant trading activity—ideal for high-volatility assets like Nasdaq (NAS100), Gold (XAUUSD), or Crypto.
Technical Configuration:
Pivot Lookback: Define the sensitivity of market structure.
Swing Area: Choose between measuring only the mecha (Wick Extremity) or the Full Range for liquidity volume calculations.
Custom Aesthetics: Fully customizable colors to match any UI theme (Dark/Light modes).
版本注释
Visual Update:Fixed color scheme for better contrast and clarity. Key components like Liquidity Level Mitigation and Dynamic FVG Reduction are now clearly identified in the publication chart to ensure the script's output is easily recognizable, following House Rules for chart legibility.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。