# Liquidity sweep + order block + fair value gap (SMC) on EURUSD, 5-minute bars - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-10-23 (approved by the owner the same day, draft 1 unchanged)**. No swing, sweep, order block, gap or trade of this test has been computed. Once frozen, any change of a rule is documented and treated as a separate test; bugs may be fixed.

## Why this test, and what was looked at before
- **Chosen by the owner** on 2026-10-23 ("da, scrie specificatia pentru order block + FVG pe EURUSD"), after reading the transcript of a YouTube video that teaches the "liquidity sweep, order block, fair value gap" sequence of smart money concepts (SMC). The presenter introduces himself as Brett Gold in the auto-generated transcript (a second channel is given as "Brad Trades"); **the name and the video title are to be confirmed by the owner before any article.** He says he made $1.5 million in trading profits last quarter and sells a mentorship and a trading app; none of this is verifiable here.
- **The claim:** "the liquidity sweep is the trap, the order block is the zone, the fair value gap is the entry"; the same model works on forex, futures, stocks, indices and crypto. His two worked examples are EURUSD (bullish) and NASDAQ futures (bearish), with a fixed 2R target.
- **Market:** EURUSD, his first and main example; one market, as in every test on this site. **Timeframe:** 5-minute bars (our choice: the video does not name one; its trades reach target "within 10 minutes", which points to a 1- to 5-minute chart).
- **Looked at before (disclosed):** on this EURUSD file, the FX study (six strategies), the golden cross, Fibonacci 61.8%, Ichimoku, Stochastic + RSI + MACD, ADX + DI, Parabolic SAR, the inside bar, TDI and Trading Made Simple, all buried. Related ideas on other markets: the fair value gap after the first 5-minute candle on NQ (buried) and the "sneaky pivot", a reversal after a sweep of the previous day's high or low (5 of 6 gates on YM, buried on gold). **No order block has been computed on the site.**

## Instrument and data
- **EURUSD**, IC Markets MT4 demo, 1-minute bid history **2004-01-01 to 2026-09-28 15:46** (`fx_data.loadFx`), New York wall clock, close stamps; **5-minute bars** built from the minutes with `gh_lib.barsOf(M, 5)`; a bar with no minute does not exist. No rule depends on the time of day, so the clock offset found by our clock audit in some weeks of 2005-2014 does not change any signal (only which calendar day a few trades are counted in).
- **Prices in pips** (1 pip = 0.0001). **Holes (rule 3):** `data_holes_eurusd.json`; every gate and verdict is recomputed without the trades whose setup or holding period touches a listed gap. (2007 is thin: about 18% fewer minutes than other years.)

## The rules, made mechanical (for a buy; sells are the mirror image)
1. **Swings:** a 5-minute bar is a swing high if its high is above the highs of the 3 bars before and the 3 bars after it (a swing low alike with lows). A swing is known only once the 3 later bars have closed.
2. **Liquidity and the sweep:** the liquidity is the most recent swing low L known before the sweep starts. A **sweep** is a bar trading below L followed by a close back above L by the same bar or one of the next 2 bars. The sweep low = the lowest low from the first bar below L to the bar that closes back above it; the **origin candle** = the bar that made the sweep low. (Without the close back above L within 3 bars it is a breakdown, not a sweep, and nothing happens.)
3. **Break of structure (the displacement):** a later bar closes above the most recent swing high H known before the sweep started, within 36 bars (3 hours) of the origin candle, and before any bar trades below the sweep low. Otherwise the setup is void.
4. **Order block (his "range" method, as he marks it in his EURUSD example):** the high-to-low range of the origin candle.
5. **Fair value gap:** among the bars from the origin candle to the break-of-structure bar, every three consecutive bars a, b, c with low(c) > high(a) leave a gap from high(a) to low(c). The gap used is the **lowest gap that touches the order block** (its bottom at or below the order block's high). If none touches it, there is no gap and the order block itself is the entry zone (his NASDAQ example).
6. **Entry zone, stop and target:** the zone is the gap if there is one, otherwise the order block. Entry level = the top of the zone; **stop = 1 pip below the bottom of the zone**; **target = 2R** (entry + 2 x (entry - stop)). The zone is fixed at the close of the break-of-structure bar.
7. **Two variants, the two entries he describes:**
   - **OB-FVG-A (aggressive, as demonstrated):** a buy limit at the entry level, from the minute after the break-of-structure bar. It fills on the first minute whose low reaches it, at the level or at that minute's open if it opens below it.
   - **OB-FVG-C (conservative, "wait for a market shift"):** after the first minute that reaches the entry level, wait for a 5-minute bar that closes above the high of the 5-minute bar in which the level was reached, within the next 12 bars (1 hour); enter at the open of the next minute. Same stop as variant A (the zone's stop) and a 2R target from this entry. If the stop is reached first, or no such close comes within 12 bars, no trade.
8. **Expiry:** the zone must be reached within 288 bars (24 hours) of the break of structure, and before price trades at or below the stop; otherwise the setup is void. A newer setup (in either direction) replaces an unfilled older one.
9. **Exits:** in the entry minute only the stop is checked; from the next minute the stop first, then the target, on every minute; a level a minute opens beyond fills at that minute's open. A trade still open at the last minute before the weekend closes at that minute's close; no new entry in the last hour before the weekend. **One position at a time**; setups formed while a trade is open are ignored.

## Costs and financing
- **1.0 pip per round trip**, as in the other EURUSD tests (IC Markets Raw: commission plus about 0.3 pip of spread). Results at 1.5 and 2.5 times the cost are also shown; the verdict is that of the base cost. A flat cost understates the wider spreads around the daily rollover (17:00 New York) and news; this is stated, not modelled.
- **Swap:** not in the base result; a stress scenario charges 0.5 pip per night held (Wednesday counting three).

## Results, periods, gates, control
- **Unit:** R per trade (net) and pips per trade. Also reported: how many sweeps, breaks of structure and setups were found, the share with a gap touching the order block, the median stop in pips and the cost in R, fills and expiries, exits by reason, long and short, by year, by hour of entry (descriptive), and the cost scenarios.
- **Periods (by entry date):** development 2004 .. 2012; validation 2013 .. 2019; holdout 2020 .. 2026-09-28 (**already used** by earlier EURUSD tests).
- **Six gates per variant:** validation profit factor >= 1.2; at least 50 trades in each period; development **t >= 2.5** (many strategies have been tried on this pair, the fair value gap and the sweep reversal have been tried on other markets, and the rules leave many readings open); above the 95th percentile of 500 runs of the matched control; positive without the 10 best trades; holdout net positive (flagged used). Fewer than 30 trades in all: Inconclusive.
- **Matched control (moved trades):** every real trade moved, all together, by one random circular offset of whole broker days (17:00 to 17:00 New York; at least 5% of them), entered at the open of the minute with the same time of day on the new day, same direction, the same stop and target distances in pips, the same exits and costs. 500 runs, seeds 1000 + run. Statistic: average net R per trade.

## Engine and self-test (before the run)
New engine `ob_lib.js`, independent re-implementation `ob_ref.js`, `ob_selftest.js` that must pass before any result is printed: swings on hand-made bars (ties and the 3-bar confirmation delay); a sweep closed back on the same bar and on the third bar, and a breakdown that is not a sweep; a break of structure within and after 36 bars, and one cancelled by a new low; the order block; a gap touching the order block, a gap above it (not used) and no gap (order block entry); the limit fill at the level and at a lower open; the conservative entry, its 12-bar limit and a stop reached first; expiry after 288 bars; a newer setup replacing an older one; stop and target in the same minute (stop first); the weekend exit; the reference matched trade by trade on the real data for both variants; the control machinery at offset 0.

## Before the article
Results go to the owner first. One article, published only with the owner's agreement. Working title for search: "Order Block and Fair Value Gap Strategy Backtest: Liquidity Sweep SMC Model on EUR/USD".

## Reading the result
"Buried" or "Inconclusive" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. One pair, one timeframe, one broker's demo history, one mechanical reading of a model its author describes as a story that must make sense in context; the higher-timeframe bias and the "meaningful level" filter he applies by eye are not tested.
