OPEN-SOURCE SCRIPT

IFVG Extended (simple)

111
This is an indicator that identifies and visualizes Inverted Fair Value Gaps (IFVG) on price charts. Here's what it does:

Core Functionality
Fair Value Gap (FVG) Detection:

Identifies bullish FVGs when current low is above the high from 2 bars ago
Identifies bearish FVGs when current high is below the low from 2 bars ago
Filters gaps using an ATR-based minimum size threshold

Inversion Tracking:

Monitors when price breaks back through identified FVGs (inversions)
Tracks the state transition from FVG to inverted FVG
Generates signals when price reacts to inverted zones
Key Features

Visual Elements:

Displays up to 500 boxes, lines, and labels on the chart
Shows the last N FVGs (configurable, default 5)
Color-coded zones: green for bullish, red for bearish
Dashed midlines through each gap
Triangle markers (▲/▼) indicating signal triggers

User Inputs:

Show Last: Number of recent IFVGs to display (1-100)
Signal Preference: Choose between "Close" or "Wick" for signal detection
ATR Multiplier: Minimum gap size filter (0.25 default)
Customizable colors for bull/bear zones and midlines
Signal Logic:

Bullish signal: Price closes above inverted bearish FVG after previously breaking below it
Bearish signal: Price closes below inverted bullish FVG after previously breaking above it
Includes alertconditions for automated notifications

Technical Implementation
Uses custom types (fvg and lab) to store gap data, manages arrays of active and inverted FVGs, and dynamically redraws all visual elements on the last bar to maintain clean chart presentation.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。