Trend-following BOS/CHoCH structure strategy — 1H breaks of structure aligned with 4H bias, mandatory EMA(50) filter, wick-confirmed breaks — backtested identically across six markets with real broker costs.
The base BOS/CHoCH structure strategy is profitable net of realistic broker costs on gold and Nasdaq, cost-wiped on silver and the S&P 500, and has no edge on EUR/USD. No consistent A-vs-B winner across markets.
The durable findings are gold-specific, pre-registered, and walk-forward confirmed (3/3 folds): restricting entries to the Tokyo/Asian session (00:00–07:00 UTC) lifts net avg R from +0.033 to +0.142; the ATR(1.5×) stop and a shorter stop lookback both improve strategy A/B respectively; disabling the event-bias flag helps strategy B. Conviction-scaled sizing cuts risk of ruin from 16.65% to 11.95%.
Everything that looked like a fix for “curtailing winners” (breakeven ratchet, partial profit-take, max-hold cap, hybrid exit) is decisively negative — the edge depends on letting trades run.
1H Break of Structure (BOS) aligned with 4H bias (WithHTF_BOS + CounterHTF_CHOCH), plus a mandatory EMA(50) alignment filter on 1H and wick-confirmed breaks (V1.3 rule). Event-driven bias and a V1.2 stop behind the last opposite 1H candle (30-bar max lookback).
Strategy A closes the runner on an opposing 1H BOS/CHoCH (matches the Pine script exactly). Strategy B uses the slower 4H structure instead — a higher-timeframe trailing exit. No consistent winner across markets.
Four validated mechanics: Tokyo-session entry filter (A), ATR-based stop 1.5×ATR14 (A), stop-lookback 30→10 bars (B), and no-event-bias (B). H2/H12 do NOT stack with each other. Breakeven ratchets, partial takes, hold-caps and hybrid exits all destroy the edge.
A second family (mean-reversion to the opposite of the last two alternating swing pivots) validated on 6/14–15 markets at a pre-registered 50% target fraction; the volume-histogram version was a null on ETHUSDT.
| Component | Rule | Notes |
|---|---|---|
| Timeframe | 1H entries / 4H HTF bias | Default pair; 15min/1H also supported |
| Signal | 1H BOS with 4H bias + EMA(50) alignment + wick-confirmed break | V1.3 rule set |
| Entry session | Tokyo/Asian only (00:00–07:00 UTC) | Gold, strategy A — 3/3 walk-forward |
| Stop | 1.5 × ATR(14) behind entry | Replaces swing stop — 3/3 folds, A only |
| Exit | Opposing 1H (A) or 4H (B) BOS/CHoCH | Runner exit; no time stops |
| Costs | Per-market broker model | Vantage FX / Bybit assumptions |
| Market | Status | Evidence |
|---|---|---|
| Gold (XAUUSD) | Profitable net of costs | Base + Tokyo filter + ATR stop; 3/3 WF folds on every validated filter |
| Nasdaq 100 | Profitable net of costs | Base strategy both A and B cost-surviving |
| Silver / S&P 500 | Gross-positive, cost-wiped | No net edge after broker costs |
| EUR/USD | No edge even gross | Fails before costs |
| Bitcoin (BTCUSD) | Inconclusive | Included in universe; perp funding framework is design-only |
| Finding | Strategy | Baseline | Variant | Walk-forward |
|---|---|---|---|---|
| Tokyo/Asian session filter | A | +0.033 | +0.142 | 3/3 |
| ATR-based stop (1.5×ATR14) | A | +0.033 | +0.094 | 3/3 |
| Stop lookback 30→10 bars | B | +0.170 | +0.213 | 3/3 |
| No event-bias (use_event_bias=False) | B | +0.170 | +0.211 | 3/3 |
| Conviction-scaled sizing (Tokyo 1.5× / others 0.75×) | A | RoR 16.65% | RoR 11.95% | enhancement of #1 |
1-minute BID candles from Dukascopy's free feed, Jan 2022 → present, resampled to 15min/1H/4H/Daily. Real per-market broker cost models.
Gross → net-of-costs → chronological 70/30 split → 3-fold walk-forward. Only pre-registered findings count; 60-test rollouts produce ~7 hits ≈ chance.
Joint (r, risk_pct) bootstrap Monte Carlo for conviction scaling; trade-autocorrelation check clean (0/24 combos significant).
Per-trade viewer with pannable Lightweight Charts candlesticks, R histograms, session/regime/cost analysis — a few hundred files total, Cloudflare-Pages safe.
# per market: download → resample → backtest → analysis → site
cd backtest && pip install requests pandas numpy pyarrow matplotlib mplfinance scipy
SYMBOL=XAUUSD # or XAGUSD / BTCUSD / USATECHIDXUSD / USA500IDXUSD / EURUSD
python scripts/download.py $SYMBOL && python scripts/build_bars.py $SYMBOL
python scripts/backtest.py $SYMBOL && python scripts/compute_costs.py $SYMBOL
python scripts/export_trade_data.py $SYMBOL && python scripts/build_site.py $SYMBOL
python scripts/build_markets_hub.py # writes site/index.html