# "Trading Made Simple" (TDI + Heikin Ashi + Stochastics) on EURUSD - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-10-22 (approved by the owner the same day, draft 1 unchanged)**. No signal 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-22, **after seeing the results of the TDI test** (`tdi_spec.md`, all three readings buried for costs). The owner pointed to the author's own thread, Forex Factory 291622 "Trading Made Simple" (Big E), whose opening posts state the method more completely than the compilation we tested from. **This is a separate test, chosen after a result on the same market and indicator**; that is disclosed wherever it is reported, and the stricter bar applies.
- **What the thread adds to our TDI-HOOK reading** (its first page, read 2026-10-22): enter at the green/red cross at the start of the next candle **only if it is candle 1 or 2 of the move**; re-enter when green **bounces off red** and continues; exit when green **goes flat, starts to hook over or makes a check-mark reversal**; Stochastics (8,3,3) **only to confirm direction**; Heikin Ashi candles only; the author trades **4-hour charts at night** (set-ups checked when the candles open at 10pm and 2am Pacific, all 4-hour trades closed at 6am Pacific) and **1-hour charts in the first three hours of the US open**. The parts called experience (support and resistance, consolidation, news) are again left out.
- **Looked at before (disclosed):** the TDI test on these EURUSD 4-hour bars (2026-10-22), and the earlier unpublished TDI work listed in `tdi_spec.md`.

## Instrument, bars and indicators
- **EURUSD**, IC Markets MT4 demo, 1-minute bid history 2004-01-01 to 2026-09-28, New York clock. **4-hour bars on the broker's clock** as in `tdi_spec.md` (closing at 01:00, 05:00, 09:00, 13:00, 17:00, 21:00 New York); **1-hour bars** on the whole hour.
- **TDI** exactly as in `tdi_spec.md` (RSI 13; green SMA 2, red SMA 7, yellow SMA 34; levels 32, 50, 68).
- **Heikin Ashi** from the ordinary bars (HA close = (O+H+L+C)/4, HA open = average of the previous HA open and close, first HA open = (O+C)/2); colour: up if HA close > HA open, down if <.
- **Stochastics (8,3,3)** as in MetaTrader: %K = 100 x sum over 3 bars of (close - lowest low of 8) / sum over 3 bars of (highest high of 8 - lowest low of 8); %D = SMA(3) of %K; computed on the ordinary bars.
- Pacific and New York time change on the same dates, so 10pm, 2am and 6am Pacific are always 01:00, 05:00 and 09:00 New York.

## Rules (fixed readings; signals at a bar close, fills at the open of the first minute of the next bar)
- **Cross:** green[k-1] <= red[k-1] and green[k] > red[k] (long); the mirror for short.
- **Candle 1 or 2:** n = the number of consecutive Heikin Ashi candles of the trade's colour ending at the signal bar (0 if the signal bar has the other colour); a cross entry is taken only if **n <= 1**, so the entry candle is candle 1 or 2 of the move.
- **Bounce re-entry (exempt from the candle rule):** while flat, a long when green has been above red on the last two bars, fell on the previous bar to within **2 RSI points** of red, and rises on the signal bar (green[k-2] > green[k-1] < green[k], green[k-1] - red[k-1] <= 2); the mirror for short.
- **Stochastics confirm direction:** a long needs %K > %D at the signal bar, a short %K < %D; and, from the author's same method, %K between 20 and 80.
- **Exit** at the first bar close where green **hooks** (moves against the trade), **goes flat** (changes by less than 0.5 RSI points from the previous bar), or crosses red the other way; one position at a time; a position open at the end of the data closes at the last close.
- **Three variants:**
  - **TMS-4H-NIGHT (the author's routine):** 4-hour bars; entries only from signal bars closing at **01:00 or 05:00 New York** (the candles opening at 10pm and 2am Pacific); every trade still open is closed at the open of the **09:00 New York** candle (6am Pacific). A trade lasts at most two candles.
  - **TMS-4H:** the same entry and exit rules on 4-hour bars at any hour, with no forced close (isolates the effect of the night window).
  - **TMS-1H-US:** 1-hour bars; entries only from signal bars closing at **08:00, 09:00 or 10:00 New York** (the first three hours of the US session, entries on the candles opening 08:00 to 10:00); exits by the rules above at any time.
- No stop, no target (as in the thread); the worst open loss is reported.

## Costs, periods, gates, control
- **1.0 pip per round trip**; 1.5x and 2.5x scenarios; swap stress 0.5 pip per night held.
- **Periods (by entry date):** development 2004 .. 2012; validation 2013 .. 2019; holdout 2020 .. 2026-09-28 (**already used**).
- **Six gates per variant:** validation profit factor >= 1.2; at least 50 trades in each period; development **t >= 2.5** (chosen after a result on the same market and indicator); 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: Inconclusive.
- **Matched control (moved entries, same time of day):** every real trade moved, all together, by one random circular offset of whole days (at least 5% of them), to the first bar of that variant opening at the same time of day on the new day, keeping its direction and its length in bars; same costs; overlapping trades dropped. 500 runs, seeds 1000 + run. Statistic: average net pips per trade. Keeping the time of day keeps the night and US-session windows in the control.
- **Rule 3:** recomputed without trades open across a suspect gap (`data_holes_eurusd.json`).

## Engine and self-test (before the run)
New engine `tms_lib.js`, independent re-implementation `tms_ref.js`, `tms_selftest.js` that must pass before any result is printed: Heikin Ashi and the candle count; Stochastics (8,3,3) against a hand calculation; the cross with the candle rule; the bounce; the stochastic filter; hook, flat and cross exits; the 01:00/05:00 entry window and the 09:00 close; the 1-hour US window; the reference matched trade by trade on the real data for all three variants; the control at offset 0 reproducing the real trades.

## Before the article
Results go to the owner first. If published, one article, linked both ways with the TDI post (whose Corrections section will note it), published only with the owner's agreement. Working title for search: "Trading Made Simple (TDI + Heikin Ashi) Backtested: the Full Rules on EUR/USD".

## Reading the result
"Buried" or "Inconclusive" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. The fixed readings of "flat", "hook", "bounce" and "candle 1 or 2" are ours; a trader reading the same posts may draw them differently.
