Free lesson · Technical analysis
Fair value gaps (FVG): three-bar geometry and fill measurement
Open interactive lessonPractice calculationsExplore labs
Start with the idea
A common FVG convention marks non-overlap between the first and third bars of a three-bar sequence. It is a chart zone, not a valuation theorem.
Symbols, units & horizon
- L_t: third bar low in price units
- H_(t−2): first bar high two fixed intervals earlier
- g: bullish gap width
- M: midpoint of the marked zone
- t: closing timestamp of the third bar
When and why to use this
Use gap size and subsequent touch events as reproducible features or event studies.
- For a bullish three-bar gap, the third bar’s low exceeds the first bar’s high. A bearish gap reverses the inequality.
- The middle bar may trade through the entire marked interval. This pattern does not prove no transactions occurred there.
- “Fair value” is a trader label; it does not establish an equilibrium price or an obligation to revisit the zone.
- Record the zone only after the third bar closes. Freeze its boundaries, expiry and minimum size, optionally scaled by prior ATR.
- Define a touch, midpoint visit, full traversal and invalidation separately. A gap-fill probability depends on the chosen horizon and definition.
- Compare matched non-gap events with similar volatility and trend. Use first-touch timing and executable prices when testing a trade.
Fair value gaps (FVG): three-bar geometry and fill measurement
- First-bar high=102 and third-bar low=104 give gap width 104−102=2.
- The bullish zone is [102,104].
- Its midpoint is (102+104)/2=103. The bearish case instead requires third high below first low.
A later low of 103.5 enters the zone but does not reach its midpoint. A later low of 101.5 crosses the full zone; actual fill prices still require an execution model.
Use the rule
- Fix the definition, units and information timestamp.
- Compute the example and inspect the graph.
- Compare with a simple baseline on untouched periods after costs.
Before moving on
Write the exact rule, its availability time, an invalidation condition and a fair out-of-sample test.
- Research context: review the related evidence checkpoint. The numerical convention here defines a candidate feature; that related research does not validate this exact rule.
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
def bullish_fvg(first_high,third_low):
if third_low<=first_high: return None
return {"low":first_high,"high":third_low,"width":third_low-first_high,"midpoint":(third_low+first_high)/2}
print(bullish_fvg(102,104))Continue learning
Technical Analysis: Geometry, Structure & Evidence — all lessons- Support, resistance and reversal: start with a price zone
- Breakout detection, false breaks and retests
- Fibonacci retracements: anchors before ratios
- Harmonic patterns: ratio constraints and competing candidates
- Elliott Wave: count hypotheses, rules and invalidation
- Fair value gaps (FVG): three-bar geometry and fill measurement
- Heikin-Ashi: smoothed candles are synthetic prices
- Renko: price-driven bricks and the missing time axis
- Dynamic support, trend lines and Gann angles
- Momentum indicators, oscillators and divergence
- Volume, supply/demand zones and what OHLCV cannot reveal
- Market structure, BOS and CHOCH as a state machine
- Moon phases: encode a calendar hypothesis and try to falsify it
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations