# H1 Open Trap with a $5 minimum stop on XAUUSD, 1-minute data - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-10-21 (approved by the owner the same day, draft 1 unchanged)**, before any trade of this variant was computed. A follow-up of h1ot_spec.md (frozen 2026-10-21); everything not written here is as in that spec.

## Why this test, and what was looked at before (disclosed)
- **Chosen by the owner after seeing the results of h1ot_spec.md** (same day): all three variants buried; median stop $1.37 from the fill, 68% of stops under $2, so the $0.30 cost was about 0.29 R a trade; before costs about zero (+0.006 R a trade at 1R). The owner asked for a larger stop, a 1R target, no trailing stop, and to keep the previous-day filter.
- Because the rule was chosen after seeing the first results (and why they failed), this is a **separate test**, reported with the first one, never instead of it. The holdout 2020 .. 2026-10-07 has been seen by both. The verdict of the first test does not change.
- The previous-day filter (skip a sell at or above the previous day's high, a buy at or below its low) was already on in the first test, as the indicator's default; it stays unchanged.

## The one change
- **Signals:** exactly the trap signals of h1ot_spec.md (same lines, filters, 3-a-day cap, fill rule).
- **Stop:** the day's extreme from the trap, as before, **unless it is closer than $5.00 an ounce to the fill; then the stop is $5.00 from the fill.** R = the distance from the fill to that stop (at least $5.00).
- **Target: +1R. No trailing stop.** Time exit at the end of the broker day (00:00 server = 17:00 New York), one position at a time, stop tested before the target inside a minute, entry-minute rules: all as before.
- **One variant: HOT-1R-S5.**

## Known weakness, stated before the run
A fixed dollar minimum is not the same size over the file: $5 was 1.3% of the gold price in 2004 (about $400) and 0.12% in 2026 (about $4,100). The result is reported by year and by period so this can be seen; no other minimum will be tried after seeing this one.

## Costs, periods, gates, control
As in h1ot_spec.md: $0.30 an ounce a round trip; periods 2004-2012 / 2013-2019 / 2020-2026-10-07 (used); six gates with development t >= 2.0; matched control with moved entries, same server time, same R in dollars (so the $5 minimum is carried into the control), same exits, 500 runs, seeds 1000 + run; rule 3 with `data_holes_xau.json`.

## Engine and self-test
`h1ot_lib.js` gets a `minStop` option on the variant (the three original variants unchanged; their trades must stay identical to the first run, checked), `h1ot_ref.js` the same option written separately; hand-worked cases for the minimum (extreme closer than $5 -> $5; farther -> the extreme; short and long), reference matched trade by trade on the real data.

## Before the article
Results go to the owner first. If there is an article, both tests are in it, the first one first.
