OPEN-SOURCE SCRIPT

Inversion Fair Value Gaps [TradingFinder] IFVG ICT Signal| Alert

By TFlab
🔵Introduction

🟣Inversion Fair Value Gap (IFVG)

An ICT Inversion Fair Value Gap, or reverse FVG, occurs when a fair value gap fails to hold its price, resulting in the price moving beyond and breaking the gap. This situation marks the initial change in price momentum.

Generally, prices respect fair value gaps and continue in their trend direction. However, when a fair value gap is breached, it transforms into an inversion fair value gap, signaling a potential short-term reversal or a subsequent change in direction.

snapshot


🔵How to Use

🟣Identifying an Inversion Fair Value Gap
To spot an IFVG, you must first identify a fair value gap.

Inversion fair value gaps can be categorized into two types:

🟣Bullish Inversion Fair Value Gap

A bullish IFVG occurs when a bearish fair value gap is invalidated by the price closing above it.
Steps to identify it:
  1. Identify a bearish fair value gap.
  2. When the price closes above this gap, it becomes a bullish inversion fair value gap.

This gap acts as a support level, pushing the price upwards and indicating a shift in momentum from sellers to buyers.

snapshot


🟣Bearish Inversion Fair Value Gap

A bearish IFVG happens when a bullish fair value gap fails, with the price closing below it.
Steps to identify it:
  1. Identify a bullish fair value gap.
  2. When the price closes below this gap, it becomes a bearish inversion fair value gap.

This gap acts as a resistance level, pushing the price downwards and indicating a shift in momentum from buyers to sellers.

snapshot


🔵Settings

🟣Global Settings

  • Show All Inversion FVG: If disabled, only the most recent FVG will be displayed.
  • IFVG Validity Period (Bar): Determines the maximum duration (in number of candles) that the FVG and IFVG remain valid.Switching Colors Theme Mode: Includes three modes: "Off", "Light", and "Dark". "Light" mode adjusts colors for light mode use, "Dark" mode adjusts colors for dark mode use, and "Off" disables color adjustments.


🟣Logic Settings

FVG Filter: This refines the number of identified FVG areas based on a specified algorithm to focus on higher quality signals and reduce noise.

Types of FVG filters:
  1. Very Aggressive Filter: Adds a condition where, for an upward FVG, the last candle's highest price must exceed the middle candle's highest price, and for a downward FVG, the last candle's lowest price must be lower than the middle candle's lowest price. This minimally filters out FVGs.
  2. Aggressive Filter: Builds on the Very Aggressive mode by ensuring the middle candle is not too small, filtering out more FVGs.
  3. Defensive Filter: Adds criteria regarding the size and structure of the middle candle, requiring it to have a substantial body and specific polarity conditions, filtering out a significant number of FVGs.
  4. Very Defensive Filter: Further refines filtering by ensuring the first and third candles are not small-bodied doji candles, retaining only the highest quality signals.


  • Mitigation Level FVG and IFVG: Options include "Proximal", "Distal", or "50 % OB" modes, which you can choose based on your needs. The "50 % OB" line is the midpoint between distal and proximal.


🟣Display Settings
  • Show Bullish IFVG: Toggles the display of demand-related boxes.
  • Show Bearish IFVG: Toggles the display of supply-related boxes.

🟣Alert Settings
  • Alert Inversion FVG Mitigation: Enables alerts for Inversion FVG mitigation.
  • Message Frequency: Determines the frequency of alerts. Options include 'All' (every function call), 'Once Per Bar' (first call within the bar), and 'Once Per Bar Close' (final script execution of the real-time bar). Default is 'Once per Bar'.
  • Show Alert Time by Time Zone: Configures the time zone for alert messages. Default is 'UTC'.
  • Display More Info: Provides additional details in alert messages, including price range, date, hour, and minute. Set to 'Off' to exclude this information.
educationalehlersfairvaluegapfvgictifvginversionfairvaluegapinversionfvgretestsignalsSupport and Resistancetradingfinder
TFlab

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer