OPEN-SOURCE SCRIPT
LTF FVGs (Lower Timeframe Fair Value Gaps) [D4A]

LTF FVGs - (Lower Timeframe FVGs)
This script draws Fair Value Gaps on the chart that occured on lower timeframe, eg. 1m FVG is drawn on 5 min chart. The script uses request.security_lower_tf to get the lower timeframe data for this. There are several distinct features that make this script unique:
- the script automatically pulls FVGs from the most relevant lower timeframe (this can be manually changed at any time)
- the size of smallest FVGs can be customized based on ATR threshold
- Volume Imbalance can be included as part of FVG
This script can be useful for traders who want to be informed about any gaps created on lower timeframe without switching to lower timeframe chart.
What is FVG?
FVG or Fair Value Gap is a three-candle formation where the middle candle moves so aggressively creating displacement that it leaves a gap between the wick of the prior candle and the wick of the following candle. Price often returns to fill these gaps before continuing — making them useful as targets, entry zones, or invalidation levels.
A bullish forms when the low of the current candle is above the high of two candles ago, with a bullish middle candle. A bearish FVG is the inverse.
FVGs often occur due to sudden market movements triggered by news events, changes in market sentiment, or large orders that move the price significantly. The market tend to return to these unfilled spaces, providing potential opportunities for traders. These areas may serve as either support (bullish FVG) or resistance (bearish FVG). They may also be completely filled by the price and then act as Inversion FVGs but this is outside of scope of this script.
SETTINGS
- Force Manual TF - the user can manually select lower timeframe from which the script can pull FVGs. When this option is not active, the script is pre-programmed to select lower timeframe automatically for FVG discovery which is at least one level below the current timeframe, eg. 15S when on 1m, 1m when on 5m and so on.
- FVG Fill and border transparency - customize the look of FVG boxes
- FVG threshold - set the threshold to eliminate very small gaps
- Volume Imbalance included - include Volume Imbalance as part of FVG. Enabled by default.
- Show LTF Label & Transparency - enable the label which shows from which timeframe is the FVG from
- Extend to Current Bar or by X-bars - customize how the FVG boxes are presented on the chart
- Max FVGs Displayed - how many FVGs should be kept in memory by default
When FVG is fully filled by price, the script removes it from the memory.
Other relevant scripts that are complementary to this script: Candle Displacement
-----------------
Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
This script draws Fair Value Gaps on the chart that occured on lower timeframe, eg. 1m FVG is drawn on 5 min chart. The script uses request.security_lower_tf to get the lower timeframe data for this. There are several distinct features that make this script unique:
- the script automatically pulls FVGs from the most relevant lower timeframe (this can be manually changed at any time)
- the size of smallest FVGs can be customized based on ATR threshold
- Volume Imbalance can be included as part of FVG
This script can be useful for traders who want to be informed about any gaps created on lower timeframe without switching to lower timeframe chart.
What is FVG?
FVG or Fair Value Gap is a three-candle formation where the middle candle moves so aggressively creating displacement that it leaves a gap between the wick of the prior candle and the wick of the following candle. Price often returns to fill these gaps before continuing — making them useful as targets, entry zones, or invalidation levels.
A bullish forms when the low of the current candle is above the high of two candles ago, with a bullish middle candle. A bearish FVG is the inverse.
FVGs often occur due to sudden market movements triggered by news events, changes in market sentiment, or large orders that move the price significantly. The market tend to return to these unfilled spaces, providing potential opportunities for traders. These areas may serve as either support (bullish FVG) or resistance (bearish FVG). They may also be completely filled by the price and then act as Inversion FVGs but this is outside of scope of this script.
SETTINGS
- Force Manual TF - the user can manually select lower timeframe from which the script can pull FVGs. When this option is not active, the script is pre-programmed to select lower timeframe automatically for FVG discovery which is at least one level below the current timeframe, eg. 15S when on 1m, 1m when on 5m and so on.
- FVG Fill and border transparency - customize the look of FVG boxes
- FVG threshold - set the threshold to eliminate very small gaps
- Volume Imbalance included - include Volume Imbalance as part of FVG. Enabled by default.
- Show LTF Label & Transparency - enable the label which shows from which timeframe is the FVG from
- Extend to Current Bar or by X-bars - customize how the FVG boxes are presented on the chart
- Max FVGs Displayed - how many FVGs should be kept in memory by default
When FVG is fully filled by price, the script removes it from the memory.
Other relevant scripts that are complementary to this script: Candle Displacement
-----------------
Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน