# Change of Character (ChoCh) / Market Structure Shift (MSS) after a liquidity sweep on NQ - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-10-26 (approved by the owner the same day, draft 1 unchanged: "Da, îngheață specificația ChoCh pe NQ așa cum e")**. Once frozen, any change of a rule is documented and treated as a separate test; bugs may be fixed. No level, swing, sweep, signal or trade of this test has been computed. This draft was written **before** the descriptive change-of-character split of the EUR/USD order block test (planned the same day for that article) was computed, so that split cannot have shaped these rules.

## Why this test, where the rules come from, and what was looked at before
- **Chosen by the owner** on 2026-10-26 ("amandoua"), from an article idea he pasted: in smart money concepts (SMC/ICT) teaching, after price takes liquidity (a previous high or low), the trader waits for a **change of character (ChoCh)**, also called a **market structure shift (MSS)**, on the 1-minute or 5-minute chart: an impulsive candle that **closes beyond the last structure point**; then enters, either at once or on a **retest of the point the shift came from**, with the **stop behind the new extreme** and a **2R target**. It is among the most widely taught day-trading templates for NQ, ES and forex.
- **Not one presenter's rules:** the idea is generic, so the mechanical readings below are ours, fixed before any result. Where teachers differ (which liquidity, which timeframe, which entry), we fix one reading and test at most two choices.
- **Looked at before (disclosed):**
  - **The EUR/USD order block and fair value gap test (23 Oct 2026, buried, no proven edge):** a 5-minute sweep of a swing low, then a close above the last swing high within 3 hours, then an entry at the order block or gap. Its break of structure did **not** require the structure before the sweep to point the other way, so it mixed changes of character with ordinary breaks of structure. That test is the closest relative of this one; this one differs in the market, in requiring a true change of character with displacement, in using named liquidity levels, and in the entries.
  - On **NQ**: the first 5-minute candle with a fair value gap (buried), opening range breakouts, the Initial Balance breakout and the noise area (all buried).
  - **Previous day high and low:** the Sneaky Pivot reversal at those levels passed 5 of 6 gates on YM (failing only the development t; now in a paper forward test) and did not replicate on gold (all buried).
  - The SMC/sweep family has therefore been tried several times on this site; that raises the bar below.

## Instrument and data
- **NQ** (E-mini Nasdaq-100 futures), `NQ_1min.csv` (NinjaTrader, back-adjusted continuous contract, 1-minute bars stamped at their close, New York clock, including the overnight session), 2020-01-01 to **2026-09-25 17:00 New York**, the cut of every futures study; the exchange calendar of our other NQ tests (`rb_lib.js`) for the regular session (09:30 to 16:00) and early closes. $20 a point, tick 0.25.
- **Holes (rule 3):** `data_holes.json`; every gate and verdict is recomputed without the trades on a day touching a known hole.

## Liquidity levels (fixed now)
- For each regular session: **PDH / PDL** = the high and low of the previous usable day's regular session (09:30 to 16:00 or the early close); **ONH / ONL** = the high and low of the overnight session before it (the minutes stamped 18:01 the previous calendar evening to 09:30). A level is missing if its session has fewer than 300 minutes (regular; 150 on an early close) or 600 minutes (overnight); a day with all four missing has no trade.
- **Sell-side levels** (below price, where a sweep sets up a **long**): PDL and ONL. **Buy-side levels** (above, set up a **short**): PDH and ONH. A level already traded through before 09:30 that morning (for ONH/ONL: not possible; for PDH/PDL: by the overnight session) is **not used** that day: its liquidity was already taken.

## Structure on the chosen timeframe (fixed now)
- **Timeframe:** 1-minute bars, or **5-minute bars** built from them on the 5-minute clock (bars stamped 07:05, 07:10, ..., 09:35, ...), from the minutes that exist.
- **Swing high:** a bar whose high is strictly above the highs of the **3 bars before and the 3 bars after** it; it is known only at the close of the 3rd bar after. **Swing low** alike with lows. On both timeframes swings are computed from the bars of **07:00 New York** that morning on (overnight bars included), so that the structure exists when the session opens.
- **ATR(14)** of the timeframe's bars (true range, simple average of the 14 bars up to the previous bar), used only for the displacement test.

## The setup (described for a long; a short is the mirror image)
1. **Sweep:** from **09:30 to 11:30 New York**, a bar's low trades **below** a sell-side level (PDL or ONL) that is still unused that day. The level is then used. The **sweep extreme** is the lowest low from that bar on; it moves lower as long as price keeps falling.
2. **The structure point to break:** the most recent swing high that is known and whose bar is **before the bar of the current sweep extreme**. It must be a **lower high**: below the swing high before it (the short-term structure was falling into the sweep). If it is not, there is no change of character to wait for; the setup waits for a new swing high that is a lower high, or lapses.
3. **Change of character (ChoCh / MSS):** a bar that **closes above** that swing high **with displacement**: its body (close minus open) is at least **1.0 x ATR(14)**. It must come **within 60 minutes** of the bar that first took the level, and by 11:30. A close above without displacement does not count; the setup keeps waiting for one within the window.
4. A sweep of a buy-side and a sell-side level waiting at the same time: whichever change of character comes first is taken; the other is dropped. Two sell-side levels taken together form one sweep.

## Entries, stop, target (two choices)
- **MKT (enter on the shift):** buy at the **open of the first minute after the ChoCh bar closes**.
- **RET (enter on the retest of the shift's origin):** a **buy limit at the broken swing high** (the structure point of step 2, the level the shift came from), working from the minute after the ChoCh bar for **up to 30 minutes** and no later than **12:00**; a minute opening below it fills at its open. Cancelled if price first reaches the 2R target computed from the limit, or trades at or below the stop.
- **Stop:** **one tick below the sweep extreme** at the moment of the ChoCh ("behind the new extreme"). No trade if the entry is at or below the stop. **R** = entry to stop, in points.
- **Target: 2R** from the entry. Stop checked first inside a minute; a level a minute opens beyond fills at the open. A trade still open is closed at the **session close** (16:00 or the early close).
- **One trade a day:** the first setup of the day that fills. Long and short.

## Variants (the only ones tested)
**CH-1M-MKT, CH-1M-RET, CH-5M-MKT, CH-5M-RET** (timeframe x entry). All long and short.

## Costs
- **$15.76 per round trip per contract** (commission $5.76 plus one tick of slippage on each fill), as in all our ES and NQ tests; also shown at 1.5x and 2.5x. Results in dollars per contract and in R.

## Periods, gates, control
- **Periods (by trade date), as in our other NQ tests:** development 2020 to 2023; validation 2024-01 to 2025-03; holdout 2025-04 to 2026-09-25 (**already used** by the earlier NQ tests).
- **Six gates per variant** (net dollars per contract): validation profit factor >= 1.2; at least 50 trades in each period; development **t >= 2.5** (four variants; the SMC and sweep family has been tried several times on this site); 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 entries):** every real trade moved, all together, by one random circular offset of whole usable days (at least 5% of them), entered at the same minute of the new day's session, same direction, the same stop distance in points, the 2R target, the same session-close exit and costs. 500 runs, seeds 1000 + run. Statistic: average net dollars per trade. It asks whether the sweep and the change of character pick better moments than the same trades on other days.
- **Also reported (descriptive):** how many days have a sweep, how many sweeps get a change of character in time, and how many of those breaks were lower highs (a change of character) against those that were not; which level was swept (PDH/PDL against ONH/ONL); win rate with its Wilson interval; exits by reason; median risk in points and its cost in R; long and short; by year; by hour of entry.

## Engine and self-test (before the run)
New engine `choch_lib.js` (the existing futures loader and calendar), independent re-implementation `choch_ref.js`, `choch_selftest.js` that must pass before any result is printed: hand-made days for the levels (a missing session; a PDH already taken overnight), swings and ties, a sweep whose extreme moves lower, a broken high that is not a lower high (no setup), a close above without displacement and a later one with it, the 60-minute window and the 11:30 cut-off, a new low after the shift (no effect on a trade already open), both entries (a retest fill, a gap through the limit, a retest cancelled by the target or by the stop, the 30-minute expiry), a buy and a sell setup on the same day, the stop and target in one minute, the session-close exit, an early close; the reference matched trade by trade on the real data for all four variants; the control at offset 0 reproducing the real trades.

## Before the article
Results go to the owner first: all four variants, every gate, long and short, by year, the exits, the cost in R. One article, published only with the owner's agreement and linked to the EUR/USD order block article. Working title for search: "Change of Character (ChoCh) Strategy Backtest: Market Structure Shift After a Liquidity Sweep on NQ".

## Reading the result
"Buried" or "Inconclusive" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. One market, one data source, our mechanical reading of a template that many traders apply with discretion (which liquidity matters, which shift is "clean").
