OPEN-SOURCE SCRIPT
Multi-Timeframe FVG [Custom]

A configurable Fair Value Gap (FVG) indicator that plots FVGs from up to 4 independent timeframes simultaneously on a single chart, with full control over how each timeframe's gaps look and behave.
Key features:
4 independent timeframes — enable any combination (e.g. 1min, 5min, 15min, 1H) at once, each with its own full set of settings.
True multi-timeframe display — a lower-timeframe FVG (e.g. 1min) still displays correctly on a higher-timeframe chart (e.g. 5min), and vice versa. Each timeframe has a toggle to control whether its gaps remain visible once the chart's timeframe is larger than that FVG's own timeframe.
Non-repainting — every FVG is confirmed only after the relevant candle closes on its own timeframe; nothing is drawn or evaluated on a still-forming candle.
Fully customizable appearance per timeframe — independent fill colour, border colour, border width, and border style (solid/dashed/dotted) for bullish and bearish gaps.
Optional midline — toggle a midline through each gap; its colour and thickness automatically match that gap's border, with its own line style.
Rectangles with optional extension — FVGs render as boxes, either a fixed width (in that timeframe's own bars) or continuously extending to the latest bar.
Fully customizable labels — optional label per gap with custom text (supports a {tf} placeholder), vertical position (top/mid/bottom), and horizontal alignment. Label size is set once globally. When a box is extending, right-aligned labels float a fixed number of chart bars ahead of price instead of getting stuck inside the box.
Per-timeframe lookback — control how many bars (of that timeframe) of history each timeframe scans and keeps, independent of the others.
Precise mitigation rule — a gap is only removed once a candle of its own timeframe closes fully across the far boundary of the gap, in the opposite direction. Chart-timeframe noise doesn't trigger it.
Notes:
All settings are grouped by timeframe in the inputs panel for quick adjustment.
This script is intended as a visual reference tool and does not generate trade signals. It is not financial advice — always do your own analysis before trading.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。