OPEN-SOURCE SCRIPT
True FVGs v2

This script identifies and plots true Fair Value Gaps (FVGs) using a strict three-candle structure, distinguishing between two formation types while accounting for doji candles. It draws shaded boxes to represent untraded price imbalances, with Type A and Type B gaps defined by precise wick-to-body and body-to-body relationships that reflect institutional price displacement. The indicator allows the user to control how far each FVG extends and how many recent FVGs remain visible, keeping the chart clean and relevant. This is helpful because it highlights high-probability areas where price is likely to react, enabling more precise trade planning, entries, and risk management without visual clutter. It expands on the first script (True FVGs) and allows for a more controlled design fitting each trader's desires.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.