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

- Official source article: `https://tradingrush.net/simple-moving-average-crossover-strategy-risked-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 manual trades.

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

- About 100 manual backtest trades.
- Reported win rate approximately 48%.
- Long: SMA9 crosses above SMA21, the signal candle is above/touching the averages,
  and price is above SMA200. Short is the mirror below SMA200.
- The article's short-side stop sentence contains a typo (it repeats the long-side
  wording) and the swing lookback for the stop is vague.

## Observed strategy rules (paraphrased)

1. Fast/slow cross: SMA9 crossing SMA21 defines the signal candle.
2. Candle location: the signal candle sits above (long) or below (short) the two
   averages, touching allowed.
3. Trend filter: above SMA200 for longs, below for shorts.
4. Stop: below/above the recent swing, plus a small buffer; 1.5R target.

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

- The 100 trades were manual picks on 30m charts with undisclosed dates and symbols;
  here H1, full 2017-2026 window, no cherry-picking.
- The short-side stop text is a copy typo in the article, so no stop sentence can be
  copied literally. We freeze one symmetric reading (below): the last 5 closed bars'
  swing high plus 1 pip for shorts, swing low minus 1 pip for longs.
- "Above/touching the averages" is frozen as: the whole closed signal candle ranges
  at or above both averages (long). A candle that merely closes above while dipping
  below does not qualify.
- The article's medium is 30m; this test runs H1 per assignment scope.

## Explicit frozen assumptions for this test

| # | Point | Frozen default | Reason |
|---|-------|----------------|--------|
| A1 | Averages | SMA9 / SMA21 / SMA200 on close | Article's stated values |
| A2 | Cross | `SMA9[i-1] <= SMA21[i-1]` and `SMA9[i] > SMA21[i]` (long); equality before the cross counts as a cross | Objective closed-bar cross |
| A3 | Candle location | Long: `low[i] >= min(SMA9[i], SMA21[i])` (touch allowed, dip fails); short mirror with `high[i]` | Literal "above/touching" |
| A4 | SMA200 filter | Signal-bar close strictly above/below SMA200 (equality fails) | Objective filter reading |
| A5 | Swing stop | Last 5 closed bars including the signal bar (`i-4..i`): long SL = swing low minus 1 pip; short SL = swing high plus 1 pip | Symmetric repair of the article's typo'd/vague stop |
| A6 | Pip | 0.0001 (EURUSD-scale) / 0.01 (EURJPY-scale), inferred from price magnitude | Needed for the 1-pip buffer on both symbols |
| A7 | Target | 1.5 x (entry - stop), set at order time | Article's stated 1.5:1 ratio |
| A8 | Bar decision timing | Closed bars only; fill at the next bar's open | Avoids intra-bar repaint |
| A9 | Overlapping signals | One position per symbol; signals while open ignored | Same convention as existing tests |
| A10 | 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 |
| A11 | 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 | Swing lookback vague | 5 bars | `swing10`: 10 closed bars — rerun both symbols |

One single-dimension variant; it 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 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`).
