INVITE-ONLY SCRIPT

Terra FVG & iFVGs

60
Terra – FVG & iFVG (Fixed-TFs for lower TF viewing)

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.

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.