Terra FVG & iFVGs

What it does
- Detects classic 3-bar Fair Value Gaps (FVGs) on a fixed source timeframe (e.g., 1m).
- Draws FVGs immediately (default white), then converts the same box to iFVG once fully mitigated by close (bull FVG → bearish iFVG color, bear FVG → bullish iFVG color).
- Lets you view higher-TF logic on lower TF charts (e.g., see 1m levels on a 15s chart).
- Optionally blind the indicator on higher TFs so it only shows at/below the source TF.
Key features
- Fixed TF input: choose one source TF; drawings align across charts via xloc=bar_time.
- FVG → iFVG conversion: automatic recolor on validation by close (no repaint tricks).
- Extend right edge: project boxes N source bars into the future.
- Independent caps: keep at most X FVGs and Y iFVGs (defaults 3 & 3).
- Draw order toggle: iFVGs on top (default) or FVGs on top.
- Opacity per type: separate transparency for FVGs vs iFVGs.
- History cap (optional): limit total boxes shown; oldest are pruned safely.
- Alerts (optional): fire on iFVG confirmation.
Inputs (quick reference)
- Source Timeframe: e.g., 1 (1m) or 15S; toggle “Show on higher TFs” if you don’t want blinding.
- Draw Order & Limits:
- iFVGs on top (ON/OFF)
- Max FVGs (default 3)
- Max iFVGs (default 3)
Colors:
- FVG (pre) color (default white) & FVG Opacity
- Bullish iFVG color & iFVG Opacity
- Bearish iFVG color
- Border Color
- Extension: Extend to the right (bars on source TF).
- Alerts: enable timeframe gating for alert messages.
How it works (logic)
- On the source TF, detect 3-bar gap:
- Bull FVG: high[2] < low
- Bear FVG: low[2] > high
- Draw FVG box immediately (white by default), anchored from candle #1 time to +N source bars.
- During the validation window, if close crosses the opposite bound, convert to iFVG (recolor, preserve/extend right edge).
- On lower TF charts, drawings are time-anchored and align 1:1.
Usage tips
- For scalps, set srcTF = 1 (1m) and view on 15s or 5s for precise entries.
- Increase extension to project levels deeper into the session.
- Use opacity to de-emphasize pre-FVGs and highlight active iFVGs.
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente BlvckSkvll.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Declinazione di responsabilità
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente BlvckSkvll.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.