# TheStrat (Rob Smith) on ES futures, 60-minute bars: the 2-1-2, 3-1-2 and 2-2 reversal with full timeframe continuity - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-10-28 (approved by the owner the same day, draft 1 unchanged: "Da, îngheaț-o")**. Once frozen, any change of a rule is documented and treated as a separate test; bugs may be fixed. No bar, pattern, signal or trade of this test has been computed.

## Why this test, where the rules come from, and what was looked at before
- **Chosen by the owner** on 2026-10-28: he sent TrendSpider's guide to **TheStrat**, the method developed by Rob Smith, and picked **ES on 60-minute bars** from the three markets proposed ("pai facem unu"), with the four variants and the method's own first target as proposed ("ok").
- **The method:** every bar is numbered against the bar before it: **1** (inside bar), **2** (directional: **2U** takes out the prior high only, **2D** the prior low only) or **3** (outside bar: both). Setups are short sequences of these numbers ("combos"). **Full timeframe continuity (FTFC):** take a setup only in the direction in which the current candles of the monthly, weekly, daily and 60-minute charts all point (price above each one's open for longs, below for shorts).
- **Sources and what each gives:** TrendSpider's guide (the bar numbers, the pattern names, FTFC; no entry, stop or target); LuxAlgo's library page on TheStrat (the bar definitions with equal highs and lows treated as not broken; for the **2-1-2** the entry at the break of the inside bar, the stop at its other side and the first target at the extreme of the bar before it; FTFC as price above or below each period's open, commonly monthly, weekly, daily and 60-minute); the TradingView script "TheStrat Suite" (entry one tick beyond the setup bar, its other side as the stop). These are secondary sources, not Rob Smith's own material; where they are silent (the 3-1-2 and 2-2 levels) we apply the 2-1-2 logic and say so below.
- **Looked at before (disclosed):** the **inside bar on EUR/USD daily** (21 Oct 2026, buried: a break of an inside bar, the same family as the 1-2), **NR7 on ES** (buried: a range contraction before a breakout), and on ES the other published tests (RSI(2), Supertrend, Bollinger, Donchian, RSI divergence, MACD, golden crosses, Coppock, EMA 9/21, intraday momentum, the noise area breakout, VWAP strategies, Fibonacci scalping, the Initial Balance breakout, the opening gap fill, the ICT Silver Bullet; all buried) and the owner's unpublished opening-range tests of September 2026. Breakout-of-a-bar ideas have been tried before; that raises the bar below.

## Instrument and data
- **ES** (E-mini S&P 500 futures), `ES_1min.csv` (NinjaTrader, back-adjusted continuous contract, 1-minute bars stamped at their close, New York clock, overnight session included), 2020-01-01 to **2026-09-25 17:00 New York**, as every futures study; the exchange calendar of our other futures tests (`rb_lib.js`) for the regular session (09:30 to 16:00) and early closes. $50 a point, tick 0.25.
- **Trading day:** from 18:00 New York the evening before to 17:00 (the Globex session), labelled with the date it ends. **A usable day** has at least 300 regular-session minutes (150 on an early-close day); entries only on usable days.
- **60-minute bars** on the clock hours (stamped at their close: 19:00, 20:00, ..., 17:00), built from the minutes that exist, overnight included, as charting platforms show ES by default; neighbours are the neighbouring existing bars (across the daily break and weekends).
- **Holes (rule 3):** `data_holes.json` (ES); a trade is dropped if a known hole overlaps the span from the start of the bar before its trigger bar to its exit, and every gate and verdict is recomputed without those trades.

## Definitions (fixed now)
- **Bar numbers** (each bar against the one before): **2U** if high > prior high and low >= prior low; **2D** if low < prior low and high <= prior high; **3** if high > prior high and low < prior low; **1** otherwise (high <= prior high and low >= prior low). Equal highs and lows are not broken.
- **FTFC at a moment, for a long:** the price is **above the open** of the current **month** (the first minute of the first trading day of the calendar month), **week** (the first minute of the week's first trading day, Sunday 18:00 normally), **day** (the first minute of the trading day, 18:00) and **60-minute bar**; for a short, below all four. It is checked at the fill price, at the minute of the fill.

## Setups, entry, stop, target (for a long; a short is the mirror image)
The **trigger bar** is the 60-minute bar that has just closed. Its order works **only during the next 60-minute bar**: a **buy stop one tick above the trigger bar's high**; a minute opening above it fills at its open.
- **STRAT-212:** the trigger bar is a **1** and the bar before it is a **2** (2U or 2D). Both breaks are traded: up (a continuation after a 2U, a reversal after a 2D) and down. **Stop:** one tick below the trigger bar's low. **Target:** the high of the 2 bar.
- **STRAT-312:** the trigger bar is a **1** and the bar before it is a **3**. Same entry and stop; **target:** the high of the 3 bar (the 2-1-2 logic applied, not given by the sources).
- **STRAT-22 (2-2 reversal):** the trigger bar is a **2D**; a long when the next bar takes out its high (which makes that bar a 2U, or a 3). **Stop:** one tick below the trigger bar's low. **Target:** the high of the bar before the trigger bar (again the 2-1-2 logic applied). After a 2U, the mirror short. A 2D followed by a further 2D (a continuation) is not traded.
- **STRAT-212-NOFTFC:** STRAT-212 without the FTFC condition, to measure what the filter adds.
- **For all:** a fill is taken only if **FTFC agrees** with its direction (not for NOFTFC), the fill minute is stamped **09:31 to 15:00** (regular session; the trigger bar may be an overnight bar), the day is usable, and the **target is above the fill** (no trade otherwise). If a fill is refused, the other direction's order of the same trigger bar stays working. A minute that reaches both orders of one trigger bar: no trade from that bar (ambiguous). **R** = fill to stop, in points.
- **Exits:** from the fill minute the stop (a level a minute opens beyond fills at the open); the target from the next minute (likewise; stop first if a minute reaches both); a position still open at the **session close** (16:00, or the early close) closes at that minute's close.
- **One position at a time** per variant; a trigger bar whose order window starts while a position is open is skipped.

## Variants (the only ones tested)
**STRAT-212, STRAT-312, STRAT-22, STRAT-212-NOFTFC.** All long and short.

## Costs
- **$30.76 per round trip per contract** (commission $5.76 plus one tick, $12.50, of slippage on each fill), as in all our ES tests; also shown at 1.5x and 2.5x. Results in dollars per contract and in R. The first target can be close to the entry; the target distance in R is reported.

## Periods, gates, control
- **Periods (by trade date), as in our other ES tests:** development 2020 to 2023; validation 2024-01 to 2025-03; holdout 2025-04 to 2026-09-25 (**already used** by the earlier ES 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; bar-breakout ideas tried before; many tests on this file); 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 open of the first minute of the new day at or after the same time, same direction, the same stop and target distances in points, the same session-close exit and costs. 500 runs, seeds 1000 + run. Statistic: average net dollars per trade.
- **Also reported (descriptive, no gates):** how often each bar number occurs; setups, orders reached, fills refused by FTFC or by the target rule, trades; the share of time FTFC was bullish, bearish or mixed; win rate with its Wilson interval; exits by reason; median risk in points, target in R and the cost in R; continuation against reversal (STRAT-212); long and short; by year; by hour of entry.

## Engine and self-test (before the run)
New engine `strat_lib.js` (the existing futures loader and calendar), independent re-implementation `strat_ref.js`, `strat_selftest.js` that must pass before any result is printed: bar numbers on hand-made bars including equal highs and lows, the month, week and day opens (a month starting on a Sunday evening, a holiday), FTFC true and false at the fill, each setup with its stop and target, a fill through a gap, an order expiring at the end of the next bar, a refused fill followed by the other direction, a minute reaching both orders, a target at or below the fill, the 09:31-15:00 entry window, 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 entries.

## 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, the FTFC effect. One article, published only with the owner's agreement, linked to the inside bar (EUR/USD) and NR7 (ES) posts. Working title for search: "TheStrat Trading Strategy Backtest: 2-1-2, 3-1-2 and 2-2 Reversals on 6 Years of ES Futures".

## 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, one timeframe, our fixed reading of a method taught with more combos, more timeframes and discretion, from secondary sources.
