Learn › Price action
Market Structure, Fair Value Gaps and Order Blocks: Definitions You Can Test
Price-action concepts such as market structure, fair value gaps and order blocks are widely discussed but often defined loosely, which makes them hard to test. If two people can look at the same chart and disagree about where the order block is, no backtest can tell you whether the idea works. This guide gives objective, rule-based definitions that can be computed bar by bar.
Swing highs and swing lows
A common definition uses a lookback of n bars on each side. A bar is a swing high if its high is higher than the highs of the n bars before it and the n bars after it. A swing low is the mirror image. With n = 2, a swing high needs two lower highs on each side.
The critical detail: a swing point is only confirmed n bars after it forms, because you need the bars that follow it. A backtest that marks the swing on the bar where it occurred is using future information. Any rule based on swings must wait for confirmation.
Market structure
- Uptrend structure: a sequence of higher swing highs and higher swing lows.
- Downtrend structure: lower swing highs and lower swing lows.
- Break of structure (BOS): in an uptrend, price closes above the most recent confirmed swing high, continuing the trend. In a downtrend, price closes below the most recent swing low.
- Change of character (CHoCH): the first break against the prevailing structure — for example, in an uptrend, a close below the most recent higher low. It is an early warning that the trend may be changing.
Whether a break requires a close beyond the level or just a wick through it is a design choice; close-based rules filter more noise.
Fair value gaps (FVG)
A fair value gap is a three-bar pattern that leaves a price range traded in only one direction:
- Bullish FVG: the high of bar 1 is below the low of bar 3. The gap is the range between bar 1's high and bar 3's low, created by a strong up-move in bar 2.
- Bearish FVG: the low of bar 1 is above the high of bar 3.
The gap is known as soon as bar 3 closes. Many traders treat an unfilled gap as a zone where price may return and react. A gap is usually considered mitigated when price trades back into it, or filled when price trades completely through it; the exact rule should be defined in advance. A minimum size filter — for example a fraction of ATR — removes trivial gaps.
Order blocks
There are several definitions in circulation. A testable version:
- Bullish order block: the last down-close bar before an up-move that produces a break of structure to the upside. The zone is that bar's range (or its open-to-low range).
- Bearish order block: the last up-close bar before a down-move that breaks structure to the downside.
Because the order block is defined by a later break of structure, it is only known once that break happens. The zone remains active until price closes through it, at which point it is considered invalidated.
Liquidity and equal highs or lows
Clusters of nearly equal swing highs or lows are often described as liquidity pools, because stop orders tend to accumulate beyond them. A testable definition: two or more confirmed swing highs within a small tolerance (for example 0.1% or a fraction of ATR) of each other. A "sweep" is when price trades beyond the cluster and then closes back inside.
Turning definitions into a strategy
A concept is not a strategy. A complete rule set also needs:
- An entry trigger (for example, the first touch of an unmitigated bullish FVG in an uptrend structure).
- A stop (for example, beyond the far edge of the zone plus a buffer) — see stop-loss types.
- An exit (a target such as the next swing high, or a trailing rule).
- Filters, such as higher-timeframe trend or session time.
Then test it on enough history, with confirmation delays respected and costs included. Price-action zones are especially prone to hindsight bias because they look obvious on a finished chart.
Key takeaways
- Define swings, breaks, gaps and blocks objectively so they can be computed and tested.
- Respect confirmation: swings need n later bars; order blocks need a later break of structure.
- Combine concepts into a full rule set with entry, stop and exit before judging them.
Educational content only. This guide explains general concepts and is not investment advice or a recommendation to trade any instrument. Trading involves substantial risk of loss, and historical or simulated results do not guarantee future performance. Read the Risk Disclosure.
