PROTECTED SOURCE SCRIPT
Fair Value Gaps (HuntsPip)

Fair Value Gaps (HuntsPip) detects and displays fair value gaps on the chart with configurable mitigation tracking and an optional midpoint (CE) line. It allows traders to identify price imbalances where aggressive buying or selling has left unfilled gaps in the market, highlighting areas where price is likely to return for rebalancing, with the consequent encroachment line marking the 50% level often targeted as a precise entry point.
────────────────────
█ CONCEPTS
A Fair Value Gap (FVG) is a three-candle pattern where the wicks of the first and third candles do not overlap, leaving a gap in the price range covered by the middle candle. This gap represents a price area where trading occurred in only one direction without being contested from the other side.
In price action and Smart Money Concepts (SMC) analysis, some traders interpret these gaps as areas of imbalance that price may revisit later. A bullish FVG forms when the low of the third candle is above the high of the first candle, suggesting an upward imbalance. A bearish FVG forms when the high of the third candle is below the low of the first candle, suggesting a downward imbalance. The midpoint of the gap - sometimes called the Consequent Encroachment (CE) - is used by some traders as a reference level within the gap. When price returns to fill or partially fill the gap, this is referred to as mitigation.
────────────────────
█ WHAT IT DOES
This tool scans for fair value gaps as they form and draws a colored box spanning the gap between the first and third candles. Each box extends forward from the point of formation and continues updating its right edge until the gap is mitigated or removed. An optional dashed midpoint line marks the CE level within each gap, and an optional label identifies each zone.
When mitigation tracking is enabled, the tool monitors whether price has returned to interact with the gap according to the selected condition. Once mitigated, the box changes to a neutral color and stops extending forward. The indicator manages a display limit, removing the oldest gaps when the maximum count is reached.
────────────────────
█ FEATURES AND USAGE
FAIR VALUE GAP
This tool works on any instrument and any timeframe. Traders who want to see only the most significant gaps can lower the display count and use a stricter mitigation condition like Close Outside, while those who want a broader view can increase the count and use Wick Inside. Fair value gaps are best used as confluence with other analysis - such as order blocks, market structure, or session levels - rather than as standalone entry triggers.
────────────────────
█ CONCEPTS
A Fair Value Gap (FVG) is a three-candle pattern where the wicks of the first and third candles do not overlap, leaving a gap in the price range covered by the middle candle. This gap represents a price area where trading occurred in only one direction without being contested from the other side.
In price action and Smart Money Concepts (SMC) analysis, some traders interpret these gaps as areas of imbalance that price may revisit later. A bullish FVG forms when the low of the third candle is above the high of the first candle, suggesting an upward imbalance. A bearish FVG forms when the high of the third candle is below the low of the first candle, suggesting a downward imbalance. The midpoint of the gap - sometimes called the Consequent Encroachment (CE) - is used by some traders as a reference level within the gap. When price returns to fill or partially fill the gap, this is referred to as mitigation.
────────────────────
█ WHAT IT DOES
This tool scans for fair value gaps as they form and draws a colored box spanning the gap between the first and third candles. Each box extends forward from the point of formation and continues updating its right edge until the gap is mitigated or removed. An optional dashed midpoint line marks the CE level within each gap, and an optional label identifies each zone.
When mitigation tracking is enabled, the tool monitors whether price has returned to interact with the gap according to the selected condition. Once mitigated, the box changes to a neutral color and stops extending forward. The indicator manages a display limit, removing the oldest gaps when the maximum count is reached.
────────────────────
█ FEATURES AND USAGE
FAIR VALUE GAP
- Show Labels - Toggles the FVG text label on each gap zone.
- Colors - Two color pickers controlling the bullish and bearish gap colors.
- Mitigation - Toggles mitigation tracking on or off. When enabled, the dropdown selects the condition that must be met for a gap to be considered mitigated. A third color picker controls the mitigated zone color.
- Close Outside - Price closes beyond the far edge of the gap.
- Wick Outside - Price wicks beyond the far edge of the gap.
- Close > 50% - Price closes past the midpoint (CE) of the gap.
- Wick > 50% - Price wicks past the midpoint (CE) of the gap.
- Close Inside - Price closes inside the gap.
- Wick Inside - Price wicks into the gap. - CE (Mid-point) - Toggles the dashed Consequent Encroachment line at the midpoint of each gap. A color picker controls the line color.
- Max FVG Displayed - Controls how many fair value gaps are shown on the chart at once. Range: 1-50. Oldest gaps are removed first when the limit is reached.
- Distance from LTP - Controls how far forward each gap box and CE line extend beyond the current bar.
This tool works on any instrument and any timeframe. Traders who want to see only the most significant gaps can lower the display count and use a stricter mitigation condition like Close Outside, while those who want a broader view can increase the count and use Wick Inside. Fair value gaps are best used as confluence with other analysis - such as order blocks, market structure, or session levels - rather than as standalone entry triggers.
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน