Inversion Fair Value Gap (IFVG) [TakingProphets]

OVERVIEW
Inversion Fair Value Gap (IFVG) [TakingProphets] marks one event cleanly: the moment a fair value gap inverts.
Every three-candle fair value gap is tracked from formation. When a confirmed close trades through it, the gap inverts and is drawn as a box extended forward in time. A bullish gap that inverts downward becomes a bearish inversion box; a bearish gap that inverts upward becomes a bullish inversion box.
This indicator does not provide trading signals, entries, or forecasts. It is a focused visualization aid for studying fair value gap inversions within an ICT-style analytical framework.
An inversion is when a fair value gap is traded through and begins acting as the opposite type, so a former area of support is studied as resistance and vice versa. This tool automates the detection and marking of that flip so it can be reviewed objectively rather than mapped by hand.
WHAT THIS TOOL IS (AND ISN'T)
-----------------------------------------------------------------------------------------------
This is the focused, single-purpose inversion tool. It detects gaps and marks the inversion, and that is its entire job.
It does not track the later reclaim of a gap; that is handled by the separate Reclaimed FVG tool, which follows the full inversion to reclaim to invalidation lifecycle.
It also does not add setups, grading, sweeps, or targets; that is the scope of the larger iFVG suite.
If a study only needs clean inversion boxes with no extra layers, this is the tool for it.
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
The tool serves as a research and study aid to document and analyze fair value gap inversions.
It is commonly used to:
Automate the marking of inverted fair value gaps.
Study how price behaves once a gap flips to the opposite character.
Review the quadrant levels of an inversion zone.
Journal how often inversions hold as support or resistance.
Teach the inversion concept in a mentorship or training context.
LOGIC STRUCTURE
-----------------------------------------------------------------------------------------------
Inversion Fair Value Gap uses a rule-based sequence. Detection and inversion both confirm on bar close, so nothing repaints intrabar.
Gap Detection
A three-candle fair value gap is detected on formation.
An optional Series mode merges adjacent gaps into one zone; Single mode treats each gap individually.
A Sensitivity preset filters gaps by a minimum size measured against ATR, from micro-gap removal to large gaps only.
Inversion
A detected gap waits to invert. If it does not invert within the allowed candle count, it is discarded before ever being drawn.
When price closes through the gap, it inverts and is drawn as a box in the opposite character, extended forward in time.
Display and Quadrants
The number of inversion boxes shown is user controlled, keeping the chart clean.
Optional quadrant lines (0, 25, 50, 75, 100 percent) can be drawn across each box.
COMPONENTS AND VISUALS
-----------------------------------------------------------------------------------------------
Inversion Box — A zone marking a gap that has been closed through and flipped to the opposite character.
Quadrant Lines — Optional internal levels at 0, 25, 50, 75, and 100 percent of a box.
Zone Label — An optional "Inversion Fair Value Gap" label.
INPUT CATEGORIES
-----------------------------------------------------------------------------------------------
General — Detection mode (Series or Single), inversion window length, Sensitivity preset, and how many inversion boxes to display.
Inversion Style — Label visibility and size, bullish and bearish colors, and quadrant line settings (visibility, color, style, and width per level).
USAGE GUIDELINES
-----------------------------------------------------------------------------------------------
Inversion Fair Value Gap is suited for the review and documentation of gap inversions.
Recommended educational workflows:
Mark inverted gaps and review how price interacts with them afterward.
Study how often an inversion holds as support or resistance versus fails.
Use the quadrant levels to review the internal structure of a zone.
Adjust the Sensitivity preset to focus on larger, cleaner gaps.
Teach the inversion concept in mentorship or training sessions.
The tool works across forex, futures, and crypto markets.
OPERATIONAL NOTES AND LIMITATIONS
-----------------------------------------------------------------------------------------------
Detection and inversion confirm on bar close, so boxes do not repaint intrabar.
Gaps that never invert within the allowed window are discarded and never drawn.
The display count and Sensitivity preset directly change how many boxes appear.
The boxes, quadrant lines, and labels are visual study aids only.
This tool does not include reclaim tracking, setups, entries, targets, or alerts.
ORIGINALITY AND ATTRIBUTION
-----------------------------------------------------------------------------------------------
The detection and inversion engine is written from scratch in Pine v6, using a three-candle gap detector, an ATR-based size filter, an optional series-merge mode, a confirmed-close inversion trigger, a capped-display system, and an optional quadrant rendering system.
Core concepts such as fair value gaps and inversions are publicly taught within ICT-style market education. This implementation was designed and engineered by TakingProphets.
TERMS AND DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is for educational and informational use only. It does not provide financial advice or predictive output. Historical patterns do not guarantee future results. All users remain responsible for their own decisions. Use of this script implies agreement with TradingView's Terms of Use.
Inversion Fair Value Gap (IFVG) [TakingProphets] marks one event cleanly: the moment a fair value gap inverts.
Every three-candle fair value gap is tracked from formation. When a confirmed close trades through it, the gap inverts and is drawn as a box extended forward in time. A bullish gap that inverts downward becomes a bearish inversion box; a bearish gap that inverts upward becomes a bullish inversion box.
This indicator does not provide trading signals, entries, or forecasts. It is a focused visualization aid for studying fair value gap inversions within an ICT-style analytical framework.
An inversion is when a fair value gap is traded through and begins acting as the opposite type, so a former area of support is studied as resistance and vice versa. This tool automates the detection and marking of that flip so it can be reviewed objectively rather than mapped by hand.
WHAT THIS TOOL IS (AND ISN'T)
-----------------------------------------------------------------------------------------------
This is the focused, single-purpose inversion tool. It detects gaps and marks the inversion, and that is its entire job.
It does not track the later reclaim of a gap; that is handled by the separate Reclaimed FVG tool, which follows the full inversion to reclaim to invalidation lifecycle.
It also does not add setups, grading, sweeps, or targets; that is the scope of the larger iFVG suite.
If a study only needs clean inversion boxes with no extra layers, this is the tool for it.
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
The tool serves as a research and study aid to document and analyze fair value gap inversions.
It is commonly used to:
Automate the marking of inverted fair value gaps.
Study how price behaves once a gap flips to the opposite character.
Review the quadrant levels of an inversion zone.
Journal how often inversions hold as support or resistance.
Teach the inversion concept in a mentorship or training context.
LOGIC STRUCTURE
-----------------------------------------------------------------------------------------------
Inversion Fair Value Gap uses a rule-based sequence. Detection and inversion both confirm on bar close, so nothing repaints intrabar.
Gap Detection
A three-candle fair value gap is detected on formation.
An optional Series mode merges adjacent gaps into one zone; Single mode treats each gap individually.
A Sensitivity preset filters gaps by a minimum size measured against ATR, from micro-gap removal to large gaps only.
Inversion
A detected gap waits to invert. If it does not invert within the allowed candle count, it is discarded before ever being drawn.
When price closes through the gap, it inverts and is drawn as a box in the opposite character, extended forward in time.
Display and Quadrants
The number of inversion boxes shown is user controlled, keeping the chart clean.
Optional quadrant lines (0, 25, 50, 75, 100 percent) can be drawn across each box.
COMPONENTS AND VISUALS
-----------------------------------------------------------------------------------------------
Inversion Box — A zone marking a gap that has been closed through and flipped to the opposite character.
Quadrant Lines — Optional internal levels at 0, 25, 50, 75, and 100 percent of a box.
Zone Label — An optional "Inversion Fair Value Gap" label.
INPUT CATEGORIES
-----------------------------------------------------------------------------------------------
General — Detection mode (Series or Single), inversion window length, Sensitivity preset, and how many inversion boxes to display.
Inversion Style — Label visibility and size, bullish and bearish colors, and quadrant line settings (visibility, color, style, and width per level).
USAGE GUIDELINES
-----------------------------------------------------------------------------------------------
Inversion Fair Value Gap is suited for the review and documentation of gap inversions.
Recommended educational workflows:
Mark inverted gaps and review how price interacts with them afterward.
Study how often an inversion holds as support or resistance versus fails.
Use the quadrant levels to review the internal structure of a zone.
Adjust the Sensitivity preset to focus on larger, cleaner gaps.
Teach the inversion concept in mentorship or training sessions.
The tool works across forex, futures, and crypto markets.
OPERATIONAL NOTES AND LIMITATIONS
-----------------------------------------------------------------------------------------------
Detection and inversion confirm on bar close, so boxes do not repaint intrabar.
Gaps that never invert within the allowed window are discarded and never drawn.
The display count and Sensitivity preset directly change how many boxes appear.
The boxes, quadrant lines, and labels are visual study aids only.
This tool does not include reclaim tracking, setups, entries, targets, or alerts.
ORIGINALITY AND ATTRIBUTION
-----------------------------------------------------------------------------------------------
The detection and inversion engine is written from scratch in Pine v6, using a three-candle gap detector, an ATR-based size filter, an optional series-merge mode, a confirmed-close inversion trigger, a capped-display system, and an optional quadrant rendering system.
Core concepts such as fair value gaps and inversions are publicly taught within ICT-style market education. This implementation was designed and engineered by TakingProphets.
TERMS AND DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is for educational and informational use only. It does not provide financial advice or predictive output. Historical patterns do not guarantee future results. All users remain responsible for their own decisions. Use of this script implies agreement with TradingView's Terms of Use.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.