# Golden cross (50 / 200) on 1-hour EUR/USD bars - frozen specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written **2026-10-08, before any EUR/USD hourly average, cross, signal or trade was computed.** What was looked at before writing it: the ES and gold 1-hour test (published results in `gh_out/`) and the FX study's cost model (`fx_spec.md`). No EUR/USD hourly number was looked at.
Bugs may be fixed after the run; rules may not. If the engine fails its self-test, nothing is run.

## Question
The 1-hour golden cross had one survivor on ES and gold: gold, long only, no stop, no target (`GH-L-N`). Does the same rule, on a currency pair with no secular drift, behave the same way? This is the first second-market check of that result. All 12 variants are run and reported, not only `GH-L-N`.

## Rules (identical to `gh_cross_spec.md`, nothing changed except the market and its costs)
- 1-hour bars built from the 1-minute MT4 history exactly as in every hourly test (bar time = close time, New York clock, server time = New York + 7 hours); 24 hours a day, no session filter; positions held over weekends.
- 50-bar and 200-bar **simple** averages of the closes. Golden cross: fast > slow and previously fast <= slow; death cross the reverse. Entries **only on a cross**, filled at the open of the next 1-minute bar plus slippage; the first-state rule; no re-entry after a stop or a target until the next cross.
- **R = 1.5 x ATR(14)** of the 1-hour bars at the signal bar, in price. Stop 1 R; targets at 1 R, 2 R, 3 R; stop wins a tie; a level gapped through fills at the open; slippage on every fill.
- 12 variants: long only (L) and long and short (LS), each with six exit rules: **N** (no stop, no target, exit on the opposite cross), **S** (stop 1 R only), **T1, T2, T3** (stop 1 R and a target at 1 R, 2 R or 3 R), **T123** (a third at each target, exact average of T1, T2, T3, no break-even move). Named `GH-L-N` ... `GH-LS-T123`, prefixed `EUR-`.
- Not tested: other averages, other stop sizes, other pairs, carry (the overnight swap), news filters.

## Data and periods
EUR/USD spot, IC Markets MT4 demo-server 1-minute bid history, 2004-01-01 to the end of the files (October 2026), as in the FX study. Early years of a demo download may contain interpolated bars. Development 2004-01-01 .. 2012-12-31; Validation 2013-01-01 .. 2019-12-31; Holdout 2020-01-01 .. end. **The holdout is not clean** (this pair and these years were used in the FX study and in the Fibonacci-pivot test).

## Costs (the FX study's model, unchanged)
About **1.0 pip per round trip**: 0.15 pip adverse on every fill (a 0.3 pip spread assumed) plus 0.7 pip commission per round trip (IC Markets Raw Spread, USD 3.50 per lot per side). The author's account is a Standard account (no commission, wider spread; published figures conflict); the FX study chose this middle figure and it is kept so the results are comparable.
Costs are constant across years, which flatters 2004-2012. **Carry (the overnight swap) is not modelled**; trades last days, so for the no-stop versions it could matter in either direction. Results are in **net R per trade** (R in price converted from the result in price), pips shown next to them.

## Gates, sample-size rule, control (identical to `gh_cross_spec.md`)
Six gates per variant: validation profit factor >= 1.2; at least 50 trades in each period; development t >= 2.5; above the 95th percentile of 500 random runs of the matched control (state series circularly shifted by at least 5% of its length, same entries, exits, R and costs; fixed seeds 1000 + run); positive without the 10 best trades; holdout net positive (flagged used). A variant with fewer than 30 trades is Inconclusive; otherwise Buried or Survivor.
**Cross-market reading:** the FX study's rule (supported only if a Survivor on at least 3 of 4 pairs) is not applied here, because only one pair is run. A Survivor on EUR/USD would be a second single-market result, not support; the transfer of the gold result is judged by whether `EUR-GH-L-N` itself survives.

## Before anything is run (self-test)
The engine gets an additive FX cost branch (pips, no roll, no financing). The self-test must pass again for ES, gold and now EUR/USD: hand-worked FX cases (entry and exit with slippage and commission in pips, a stop gapped through) and the independent re-implementation matching the engine trade by trade on the real EUR/USD data for all 12 variants. The ES and gold results must reproduce exactly (re-run and compared). No result is printed.

### Run log (2026-10-08)
The first self-test run on EUR/USD failed the independent-reference comparison for all 12 variants; the cause was floating-point noise on bars where the two averages are mathematically equal (see the numerical note in `gh_cross_spec.md`). The cross rule was not changed; ties below 1e-10 are now exact ties in the engine and in the reference. The self-test then passed, ES and gold results reproduced (gold: second-decimal changes only, no verdict changed), and the EUR/USD run was done once with these rules. Nothing was changed after seeing EUR/USD results.

## Reading the result
"Inconclusive" and "no proven edge" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. One pair, one broker's demo history, one stop size.

### Terminology note (added 2026-10-08, after outside review; no rule changed)
Where this specification says "matched random control", the benchmark of the EUR/USD test is a **circularly shifted state-series control**: the real up and down state series of the two averages is shifted by a random offset of at least 5% of its length and the same rules, prices and costs are applied (not a random-entry test). The ATR-based R, and with it every stop and target distance, is recomputed at the shifted signal time from the real prices.
