OPEN-SOURCE SCRIPT
unFair Value Gap Detector [theUltimator5]

The unFair Value Gap Detector (uFVG) highlights imbalance zones that form when trend strength is weak but directional pressure spikes—a condition often followed by price reversion back into that level. Unlike the classic 3-candle ICT FVG, this tool is designed to help you have an unFair edge in gap retracement detection by plotting high probability gap reversion opportunities on the current timeframe and the next FIVE (yes five) higher timeframes.
What you’ll see:
Note: This indicator is intentionally minimalistic visually to minimize chart clutter, while still being an extremely powerful tool
Optional visuals:
Why it is unique and effective (the “unfair” edge):
How to use it:
Customization
What you’ll see:
- Gap line per event: A single, no-nonsense line at the level price most often returns to.
- Auto multi-timeframe view: uFVG ladders up through five higher timeframes and shows their levels too—each with its own color.
- Smart de-clutter: Near-duplicate lines across timeframes are filtered so your chart stays readable.
Note: This indicator is intentionally minimalistic visually to minimize chart clutter, while still being an extremely powerful tool
Optional visuals:
- Light background tint during quiet, coiling conditions.
- Soft fill from price to the active line for quick context.
- Compact labels that note the price and which timeframe printed it.
Why it is unique and effective (the “unfair” edge):
- Early, practical context: Spots levels near when the imbalance forms—useful before the crowd catches on.
- Clarity over noise: One line per event. No boxes, no sprawling zones, fewer “maybe” areas.
- Timeframe confluence: When multiple timeframes cluster around the same price, you’ve got a stronger focal point.
- Simple risk framing: If price slices through the line decisively, that idea’s done. Next.
How to use it:
- Mean-reversion play: Look for price to tag the line, take profits into it, or fade a first reaction.
- Continuation play: After the line is “mitigated,” reassess in the original direction.
- Prioritize by timeframe: Higher-timeframe lines tend to carry more weight.
- Respect clusters: Multiple lines stacked near one price often mark important pivots.
Customization
- Colors: Separate colors for current and higher-timeframe lines.
- Toggles: Turn on/off background highlights, line-to-price fill, and labels.
- Minimal fuss: The rest is auto—timeframes, line lifecycle, and de-duplication are handled for you.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.