INVITE-ONLY SCRIPT

Fair Value Gap / iVFG / Imbalance / MTF Suite

104
Description

This indicator detects Fair Value Gaps (FVGs) and Imbalances across up to 10 user-selected timeframes and manages them with precise retest handling and clean visualization options.

What’s unique

3-candle FVG detection per timeframe (no lookahead).

Retest handling: on the first touch the touched edge snaps to the retest wick and the zone recolors (fresh → retested).

Right-side projection limits to avoid endless extensions.

Deterministic multi-TF overlay: HTF zones are computed independently (lookahead off) and drawn in a stable, priority-based order.

iFVG / parked zones: optionally convert a filled gap into an iFVG (parked/blue) instead of deleting/greying it.

Optional Imbalance Add-on (3-candle), with split halves + 50% midline.

How it works (technical)

FVG logic (3 candles):
Bullish when low[2] > high (gap up); Bearish when high[2] < low (gap down).
The created box spans the untraded range of candle B and starts at time[2].

Retest behavior:
On the first wick-touch, the nearest boundary adapts to the wick extreme. If enabled, the box recolors to a “retested” palette.

Projection:
Boxes extend to the right; optional bar limit constrains length.

Display limits:
FIFO pruning per direction keeps only the newest N boxes; iFVG/grey pools can share or use separate limits.

Imbalance Add-on (optional):
Classic 3-candle imbalance; draws upper/lower halves and an optional 50% midline.

No lookahead / confirmation:
Calculations run with barmerge.lookahead_off; detection finalizes on bar close (repaint-free on close).

How to use

Treat fresh gaps as potential reaction zones or confluence with liquidity / structure.

Use retested gaps for continuation or rejection logic.

Limit right-projection and visible count to keep charts readable on lower TFs.

Combine with your own execution rules (entries, stops, partials).

Key settings

General: adjust/recolor on retest, right-side limit (bars).

Display Limits: max visible per direction; separate iFVG cap if desired.

Visuals: filled vs. outline, transparency, TF labels (auto or custom), label alignment.

Theme: presets (Pegasus Classic, Icefire, Solarized, Heatmap, Pastel, Monochrome) or Custom colors.

Timeframes: enable up to 10 TF slots (e.g., M1/M5/M15/H1/H4/D1…).

Add-on — Imbalance: enable/disable, midline on/off, filled/outline, colors.

Alerts

New Bullish FVG

New Bearish FVG

Add-on: New Bullish Imbalance

Add-on: New Bearish Imbalance

Notes & limitations

FVG detection is confirmed on bar close; intrabar retest recolor can occur as price interacts.

Historical rendering depends on chart history & session settings.

Many TFs + large box counts can be heavy; use projection limits and display caps for performance.

This tool does not generate trade signals; it visualizes inefficiencies for discretionary or rules-based workflows.

Disclaimer

For educational and informational purposes only. Not financial advice.

Access / Support: Invite-only. For access or assistance, please DM.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.