OPEN-SOURCE SCRIPT
FVG / iFVG / BPR - Core X

# 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.
**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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.