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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.