OPEN-SOURCE SCRIPT

FVG / iFVG / BPR - Core X

269
# FVG / iFVG / BPR – Multi-Timeframe

**Description:**

This indicator automatically detects Fair Value Gaps (FVG), tracks their invalidation into Inverse FVGs (iFVG), and identifies Balanced Price Range (BPR) zones — all simultaneously across up to 5 independent timeframes (defaults: chart, 5m, 15m, 4H, D).

**What the script does**

A Fair Value Gap is a price imbalance formed by three consecutive candles — a gap between the high of the first candle and the low of the third (bullish), or the reverse (bearish). The script draws it as a box that keeps extending to the right until price touches a chosen mitigation level (Proximal / 50% / Distal, configurable separately for FVG). If price later closes a candle beyond the opposite boundary of the zone, the FVG is invalidated and flips into an iFVG — a signal of potential continuation in the opposite direction, with its own independently configurable mitigation level.

A BPR forms where two oppositely oriented FVG zones on the same timeframe overlap, marking an area of balance between supply and demand.

**How to read the zones**

Color indicates direction (green = bullish, red = bearish); violet is reserved exclusively for BPR zones. A slate-gray color means the zone has already reached its mitigation level. The label next to each zone also carries a marker: ✓ means the zone reached its target, ✗ means the original FVG was invalidated and flipped into an iFVG. Once a zone reaches its final mitigation level, it's automatically removed from the chart so resolved historical zones don't clutter the view.

**Settings**

Optional toggle to show only zones matching the chart's currently active timeframe, a minimum zone-size filter (in pips or ATR multiples), a validity period for zones that never get mitigated (auto-cleanup), independent mitigation levels for FVG/iFVG/BPR, and dedicated alerts for every stage (FVG formed, FVG mitigated, iFVG formed, iFVG mitigated, BPR formed, BPR touched).

**Disclaimer**

This indicator visualizes price imbalances based on ICT/Smart Money concepts and is intended for analytical and educational purposes only. It does not constitute financial advice or a trading signal — all trading decisions and associated risks remain solely with the user.

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

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