# TR-Donchian — Rules (own words, not a transcript copy)

- Official source article: `https://tradingrush.net/best-donchian-channels-trading-strategy-ever-tested-100-times/`
- Accessed: 2026-09-29. No video transcript is used here; the article is the source.
- Scope of this file: what the article was observed to say, what we assume, and what
  stays open. This is a mechanical variant of the article's idea, not an exact
  replication of its 100 hand-picked manual trades.

## Article claim (as stated in the article, not our measurement)

- About 100 hand-picked manual backtest trades on 30-minute charts.
- Reported win rate approximately 58% at a fixed 1.5:1 reward-to-risk.
- Long: the upper Donchian band makes a higher high after the lower band made a lower
  low; price above MA200. Short is the mirror.
- The article states the actual counted test used a fixed stop, not the band stop.

## Observed strategy rules (paraphrased)

1. Donchian channel: upper band = highest high over the lookback, lower band = lowest
   low over the lookback.
2. Long setup: the lower band prints a lower low, then later the upper band prints a
   higher high (an alternating expansion sequence).
3. Long filter: price above the 200-period moving average. Short mirror below it.
4. Stop/target in the counted test: a fixed stop (distance not specified precisely
   enough to copy) with a 1.5R target.

## Differences to the source (why no exact replication is claimed)

- The 100 trades were hand-picked on 30m charts with undisclosed dates, symbols and
  a fixed stop distance that cannot be reconstructed; here H1, full 2017-2026 window,
  no cherry-picking.
- "Higher high after lower low" is a visual description, not an algorithm. We freeze
  one objective reading (below): a lower-band step-down arms the long side, a later
  upper-band step-up triggers it. Other readings (e.g. comparing band values across
  N bars, requiring the trigger bar itself to exceed a prior swing) would give
  different trades.
- The article's counted test used a fixed stop while describing band logic; our base
  freezes the objective band stop (SL at the opposite band on the signal bar) and our
  `atrstop` variant freezes one fixed-stop reading (2.0 x ATR14 from the signal
  close). Neither claims to be the article's stop.

## Explicit frozen assumptions for this test

| # | Point | Frozen default | Reason |
|---|-------|----------------|--------|
| A1 | Donchian length | 20 | Standard platform default; article gives no value |
| A2 | Bands from | Completed-bar high/low, including the signal bar | Causal, no lookahead |
| A3 | "Lower low" event | Lower band steps down vs prior bar (`lo[i] < lo[i-1]`); equality is not an event | Objective, single-bar resolution |
| A4 | "Higher high" event | Upper band steps up vs prior bar (`up[i] > up[i-1]`); equality is not an event | Mirror of A3 |
| A5 | Alternation | Explicit per-direction state: a lower-low arms the long side; only a strictly later bar's higher-high triggers it (arm and trigger can never share a bar); firing disarms until the next opposite extreme | Literal "after" in the article |
| A6 | MA200 | SMA200 on close; long requires signal-bar close above it, short below it (strict; equality fails the filter) | Objective filter reading |
| A7 | Timeframe | H1 | Assignment scope (source used 30m) |
| A8 | Bar decision timing | Closed bars only; fill at the next bar's open | Avoids intra-bar repaint |
| A9 | Base stop | Opposite band on the signal bar (long: lower band; short: upper band) | Objective band stop |
| A10 | Target | 1.5 x (entry - stop), set at order time | Article's stated 1.5:1 ratio |
| A11 | Overlapping signals | One position per symbol; signals while open ignored | Same convention as existing tests |
| A12 | Exit on opposite sequence | No (positions exit only at SL/TP) | Matches a fixed-SL/TP counted test |
| A13 | Costs | Fixed assumed costs (bid-only data): spread EURUSD 1.0 pip / EURJPY 1.2 pip (half-spread adverse per fill) plus $7/lot round trip ($0.07 at 0.01 lot); EURJPY commission converted at fixed USDJPY 140 | Assumptions, not measured costs |
| A14 | Period / split | Full Dukascopy H1 window from 2017 per symbol, predeclared IS/OOS split at 2024-01-01 00:00 UTC+2 (trades assigned by exit time) | W7-TEST requirement |

## Open points and variant plan (at most three variants including base)

| # | Open point (source silent or ambiguous) | Base (above) | Variant (`test.py` id) |
|---|----------------------------------------|--------------|------------------------|
| V1 | Lookback unknown | 20 | `dc10`: length 10 — rerun both symbols |
| V2 | Counted test used a fixed stop, distance unknown | Band stop | `atrstop`: fixed 2.0 x ATR(14) from signal close — rerun both symbols |

No variant changes two dimensions at once; each variant reruns the full two-symbol
battery so the reported range reads "depending on open point X, the measured win
rate lies between A and B". The article's manual 100-trade sample (hand-picked,
30m, unknown dates/spread) cannot be reconstructed; no exact replication is claimed.

Reproduce with `py -3.11 test.py` (vectorbtpro). Outputs are in `results/`.
Engine: signal/execution conventions and cost model are shared with the existing
`w7_vbt.py` harness (imported, not modified); every ledger trade is replayed in
vectorbtpro at exact fills (see `vbt_reconciled` in `results/summary.csv`).
