OPEN-SOURCE SCRIPT
Updated FVG Indicator

FVG (Fair Value Gap) Indicator – Multi-Timeframe & iFVG Support
The Fair Value Gap (FVG) represents a sharp price imbalance created during aggressive moves. In Smart Money Concepts, these areas act as key support and resistance zones. This indicator provides a comprehensive, highly customizable visualization of FVGs directly on your chart.
🔍 Key Features
📊 Interpretation Guide
The Fair Value Gap (FVG) represents a sharp price imbalance created during aggressive moves. In Smart Money Concepts, these areas act as key support and resistance zones. This indicator provides a comprehensive, highly customizable visualization of FVGs directly on your chart.
🔍 Key Features
- Multi-Timeframe Support (HTF): Display FVGs from your current timeframe plus up to 3 higher timeframes simultaneously (e.g., view 1m, 5m, 15m, and 1h FVGs all on a single 1-minute chart).
- iFVG (Inverted FVG) Auto-Conversion: When price closes below a Bullish FVG, it auto-converts to a [color=#800080]Bearish iFVG (Purple)[/color]. When price closes above a Bearish FVG, it auto-converts to a [color=#009999]Bullish iFVG (Teal)[/color]. iFVGs have independent line styles (Dashed/Dotted/Solid) and widths for easy distinction.
- Extension Modes: Choose how far the FVG boxes extend to the right.
- No Extension: Boxes remain within the original candle range.
- Custom Extension: Boxes extend for a specific number of bars you define.
- Infinite Extension: Boxes extend infinitely to the right edge of the chart, with labels fixed to the right for real-time price context. - Volume Threshold (Highlight / Filter): Separate significant FVGs from minor ones using volume.
- Supports SMA, EMA, or Z-Score for volume averaging.
- Highlight Mode: Adds a yellow border and a ★ star to FVGs that exceed the volume threshold.
- Filter Mode: Hides FVGs that do NOT meet the volume threshold, keeping your chart clean and focused. - Fully Customizable Styling: Set independent background colors, border colors, and border widths for Bullish FVG, Bearish FVG, Bullish iFVG, and Bearish iFVG. Adjust label text color, size, and offset freely.
📊 Interpretation Guide
- Bullish FVG (Green): Gap created after a strong upward move[/td][td]Acts as a key support zone during pullbacks.[/td][/tr]
- Bearish FVG (Red): Gap created after a strong downward move[/td][td]Acts as a key resistance zone during bounces.[/td][/tr]
- Bullish iFVG (Teal): Price breaks above a Bearish FVG's top[/td][td]Indicates prior resistance has flipped into support.
- Bearish iFVG (Purple): Price breaks below a Bullish FVG's bottom Indicates prior support has flipped into resistance.
- Volume exceeds the defined threshold: Highlights that this FVG is backed by strong volume, making it more significant.
⚙️ Important Input Settings Explained- Bullish / Bearish FVG Display: Toggle to show or hide specific directional FVGs.
- Maximum FVG Boxes: Limits the total number of boxes displayed (1–100) for optimal performance.
- HTF 1 / 2 / 3: Enter higher timeframe values (e.g., 60 for 60 minutes, 240 for 240 minutes, D for Daily, W for Weekly). Leave blank to disable.
- Threshold Mode:
- None: Displays all FVGs regardless of volume.
- Highlight: Visually emphasizes FVGs that pass the volume test.
- Filter: Only displays FVGs that pass the volume test.
- Threshold Type: (SMA / EMA/ Z-score) Simply need to select a indicator for measuring the threshold.
- Recommand Setting: If you select SMA or EMA >> length: 3~20 & Multiply 1.5
If you select Z-score(sma based) >> length: 3~20 & Multiply 1 - Apply Threshold to iFVG: When enabled, the volume threshold is re-evaluated when a standard FVG converts to iFVG.
⚠️ Important Notes- To prevent repainting and false signals, higher timeframe (HTF) data is fetched with lookahead turned OFF. This ensures the indicator relies only on closed HTF candles.
- The script is configured with a maximum of 500 boxes and 500 labels to handle heavy multi-timeframe rendering without performance lag.
- This indicator is based on historical price data. It should be used in confluence with price action, market structure, or other confirmation tools—not as a standalone buy/sell signal.
[br]
📜 License
This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0).- ✅ Allowed: Free use, modification, and sharing for non-commercial purposes.
- ❌ Prohibited: Commercial use, redistribution for profit, or publishing without proper credit.
- 🔗 Required: Always retain the original author's credit (Lapa) and provide a link to the license.
Full license details: creativecommons.org/licenses/by-nc-sa/4.0/
Release Notes
[2026-08-03 UTC+9 18:36]Fixed Open Gap Display Bug
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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 PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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 PulseWire. Read more in the Terms of Use.
