PROTECTED SOURCE SCRIPT
QuantMotions - FVG with Volume Tracking

Fair Value Gap Detector with Dynamic Shrinking & Volume Analysis
Overview
Advanced Fair Value Gap (FVG) detection indicator with real-time box shrinking and volume delta analysis. Automatically identifies price inefficiencies and tracks institutional volume flow within each gap.
What are Fair Value Gaps?
Fair Value Gaps occur when price moves so rapidly that a "gap" is left between three consecutive candles, creating an inefficiency where no trading occurred. These gaps often act as support/resistance zones that price tends to revisit.
Detection:
- Bullish FVG: When low[0] > high[2] (upward price inefficiency)
- Bearish FVG: When high[0] < low[2] (downward price inefficiency)
Key Features
Dynamic Box Shrinking
FVG boxes automatically shrink as price enters them:
- Bullish FVGs shrink from top as price moves down into the gap
- Bearish FVGs shrink from bottom as price moves up into the gap
- Provides precise visualization of remaining unfilled gap area
Volume Delta Analysis
Tracks volume characteristics for the 3-candle FVG formation:
- Total Volume: Sum of volume from all three FVG candles
- Up/Down Split: Separates buying vs selling pressure
- Delta %: Shows directional bias of volume flow
- Color Coding: Green/Red when volume confirms direction, Orange when it doesn't
Smart Filtering
- ATR-based minimum gap size - Filters out insignificant noise gaps
- Auto-cleanup - Removes fully filled FVGs automatically
- Maximum display limit - Keeps charts clean by limiting visible FVGs
Live Statistics
Real-time stats table showing:
- Active bullish/bearish FVG count
- Average volume delta for each direction
- Fill progress tracking
Settings
Min Gap Size (ATR): Minimum gap size as multiple of ATR(14). Default: 0.3
- Lower values (0.1-0.3): More sensitive, shows smaller gaps
- Higher values (0.5-1.0): More selective, only significant gaps
Max FVGs: Maximum number of FVG boxes to display (5-100)
Remove Fully Filled: Automatically remove FVGs when price completely fills them
Shrink on Partial Fill: Enable dynamic box shrinking as price enters gaps
Show Volume Info: Display volume delta labels at box edges
How to Use
1. Confluence Trading: Look for FVGs that align with your support/resistance levels
2. Volume Confirmation: Check volume delta - strong directional volume increases probability
3. Partial Fills: Watch for price reactions at shrinking FVG boundaries
4. Multiple Timeframes: Use on higher timeframes (4H+) for swing trading, lower timeframes for scalping
Best Practices
- Combine with trend analysis - FVGs in trend direction have higher fill rates
- Pay attention to volume delta - gaps with confirming volume are more reliable
- Use on liquid markets for accurate volume data
- Higher timeframe FVGs typically carry more significance
Notes
- Works on all timeframes and instruments
- Volume data accuracy depends on your data provider
- FVGs are not guaranteed support/resistance - use proper risk management
- This indicator shows historical inefficiencies, not future predictions
Disclaimer: This indicator is for educational purposes only. Past performance does not guarantee future results. Always use proper risk management.
Overview
Advanced Fair Value Gap (FVG) detection indicator with real-time box shrinking and volume delta analysis. Automatically identifies price inefficiencies and tracks institutional volume flow within each gap.
What are Fair Value Gaps?
Fair Value Gaps occur when price moves so rapidly that a "gap" is left between three consecutive candles, creating an inefficiency where no trading occurred. These gaps often act as support/resistance zones that price tends to revisit.
Detection:
- Bullish FVG: When low[0] > high[2] (upward price inefficiency)
- Bearish FVG: When high[0] < low[2] (downward price inefficiency)
Key Features
Dynamic Box Shrinking
FVG boxes automatically shrink as price enters them:
- Bullish FVGs shrink from top as price moves down into the gap
- Bearish FVGs shrink from bottom as price moves up into the gap
- Provides precise visualization of remaining unfilled gap area
Volume Delta Analysis
Tracks volume characteristics for the 3-candle FVG formation:
- Total Volume: Sum of volume from all three FVG candles
- Up/Down Split: Separates buying vs selling pressure
- Delta %: Shows directional bias of volume flow
- Color Coding: Green/Red when volume confirms direction, Orange when it doesn't
Smart Filtering
- ATR-based minimum gap size - Filters out insignificant noise gaps
- Auto-cleanup - Removes fully filled FVGs automatically
- Maximum display limit - Keeps charts clean by limiting visible FVGs
Live Statistics
Real-time stats table showing:
- Active bullish/bearish FVG count
- Average volume delta for each direction
- Fill progress tracking
Settings
Min Gap Size (ATR): Minimum gap size as multiple of ATR(14). Default: 0.3
- Lower values (0.1-0.3): More sensitive, shows smaller gaps
- Higher values (0.5-1.0): More selective, only significant gaps
Max FVGs: Maximum number of FVG boxes to display (5-100)
Remove Fully Filled: Automatically remove FVGs when price completely fills them
Shrink on Partial Fill: Enable dynamic box shrinking as price enters gaps
Show Volume Info: Display volume delta labels at box edges
How to Use
1. Confluence Trading: Look for FVGs that align with your support/resistance levels
2. Volume Confirmation: Check volume delta - strong directional volume increases probability
3. Partial Fills: Watch for price reactions at shrinking FVG boundaries
4. Multiple Timeframes: Use on higher timeframes (4H+) for swing trading, lower timeframes for scalping
Best Practices
- Combine with trend analysis - FVGs in trend direction have higher fill rates
- Pay attention to volume delta - gaps with confirming volume are more reliable
- Use on liquid markets for accurate volume data
- Higher timeframe FVGs typically carry more significance
Notes
- Works on all timeframes and instruments
- Volume data accuracy depends on your data provider
- FVGs are not guaranteed support/resistance - use proper risk management
- This indicator shows historical inefficiencies, not future predictions
Disclaimer: This indicator is for educational purposes only. Past performance does not guarantee future results. Always use proper risk management.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。