OPEN-SOURCE SCRIPT
Multi-Timeframe Fair Value Gap by Vigna

📊 Multi-Timeframe Fair Value Gap (FVG) Indicator
This indicator displays Fair Value Gaps (FVGs) from multiple timeframes simultaneously on your chart. FVGs are price gaps that occur when the market moves quickly and skips certain price levels. These gaps tend to be "filled" later and often serve as important support and resistance zones.
🎯 What are Fair Value Gaps?
A Fair Value Gap occurs when:
Bullish FVG: The current low is higher than the high from 2 candles ago (gap upward)
Bearish FVG: The current high is lower than the low from 2 candles ago (gap downward)
⏱️ Supported Timeframes:
1 Hour (1H)
2 Hours (2H)
3 Hours (3H)
4 Hours (4H)
1 Day (1D)
1 Week (1W)
🎨 Features:
✅ All timeframes visible simultaneously
✅ Each timeframe has its own color (bullish & bearish)
✅ Labels show the timeframe of each gap
✅ Automatic deletion when gap is filled
✅ Optional: MidPoint Fill (gap marked as filled at 50%)
✅ Extend right: Gaps extend to the right until filled
✅ All colors fully customizable
⚙️ Settings:
Timeframes: Enable/disable individual timeframes as needed
MidPoint Fill: Mark gap as filled when 50% is reached
Delete On Fill: Automatically remove filled gaps from chart
Label Timeframes: Show labels with timeframe names
Colors: Customize all colors to your preferences
💡 Application:
FVGs often serve as magnetic attraction points for price
Higher timeframe FVGs (4H, 1D, 1W) are typically more significant
Use FVGs as potential entry/exit zones
Combine with other indicators for better confirmation
📈 Recommended Use:
Works best on timeframes from 15min to 1H
Ideal for Forex, Crypto, and Stocks
Especially useful for Swing Trading and Day Trading
🔧 Technical Details:
Uses optimized request.security() calls (12 total, under the 40 limit)
Employs tuple syntax for efficient data fetching
Real-time gap detection and filling mechanism
Memory-efficient array management with var keyword
This indicator displays Fair Value Gaps (FVGs) from multiple timeframes simultaneously on your chart. FVGs are price gaps that occur when the market moves quickly and skips certain price levels. These gaps tend to be "filled" later and often serve as important support and resistance zones.
🎯 What are Fair Value Gaps?
A Fair Value Gap occurs when:
Bullish FVG: The current low is higher than the high from 2 candles ago (gap upward)
Bearish FVG: The current high is lower than the low from 2 candles ago (gap downward)
⏱️ Supported Timeframes:
1 Hour (1H)
2 Hours (2H)
3 Hours (3H)
4 Hours (4H)
1 Day (1D)
1 Week (1W)
🎨 Features:
✅ All timeframes visible simultaneously
✅ Each timeframe has its own color (bullish & bearish)
✅ Labels show the timeframe of each gap
✅ Automatic deletion when gap is filled
✅ Optional: MidPoint Fill (gap marked as filled at 50%)
✅ Extend right: Gaps extend to the right until filled
✅ All colors fully customizable
⚙️ Settings:
Timeframes: Enable/disable individual timeframes as needed
MidPoint Fill: Mark gap as filled when 50% is reached
Delete On Fill: Automatically remove filled gaps from chart
Label Timeframes: Show labels with timeframe names
Colors: Customize all colors to your preferences
💡 Application:
FVGs often serve as magnetic attraction points for price
Higher timeframe FVGs (4H, 1D, 1W) are typically more significant
Use FVGs as potential entry/exit zones
Combine with other indicators for better confirmation
📈 Recommended Use:
Works best on timeframes from 15min to 1H
Ideal for Forex, Crypto, and Stocks
Especially useful for Swing Trading and Day Trading
🔧 Technical Details:
Uses optimized request.security() calls (12 total, under the 40 limit)
Employs tuple syntax for efficient data fetching
Real-time gap detection and filling mechanism
Memory-efficient array management with var keyword
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。