AUD_v1 trades AUDUSD using a single boolean entry signal: Williams %R(14)
computed on Daily-resampled bars. When Williams crosses up through −50 (close moves to upper half of recent 14-day range)
a LONG opens; when it crosses down through −50, a SHORT opens. Each position has a fixed take-profit, stop-loss,
1-week timeout, and Friday-21:00-UTC weekend force-close. No grid, no martingale, no compound-tricks — just a clean
single-position bot whose only job is "trade in the direction of the daily-autocorrelation regime."
Strategy spec (live)
- Pair: AUDUSD (Exness Cent #160001992)
- Indicator: Williams %R period 14 on Daily-resampled bars
- Entry: cross at −50, both directions (long on up-cross, short on down-cross)
- Take-profit: 150 pips (was 200 — E46 walk-forward zoom found 150 better)
- Stop-loss: 30 pips
- Timeout: 168 H1 bars (1 week)
- Weekend close: Friday ≥ 21:00 UTC
- Risk per trade: 5% of broker equity (was 10% — reduced after K-fold revealed wider DD bands)
- Magic number: 777401
- Tier choice: Tier C of E52 K-fold ranking — most regime-robust
Backtest performance (22-yr AUDUSD H1)
- Out-of-sample Calmar: 28.34 (vs deployed EMA's 4.3 = 6.6× lift)
- Out-of-sample CAGR: +641% (4-year IS vs 11-year OOS at the 2014-12-31 split)
- Out-of-sample max drawdown: 22.6%
- Out-of-sample profit factor: 4.22
- ~32 trades/year, ~57% win rate (most non-TP closes are also profitable timeouts)
- K-fold across 6 regimes (2004-2026): all profitable, max DD bounded at 24% in every regime
- K-fold Calmar CV: 0.54 (3-4× more regime-stable than aggressive tiers)
Why Williams %R, not EMA?
- Tested 161 indicators across 17 phases (MA crosses, oscillators, channels, trend strength, statistical, Ehlers cycle, regime detectors, fractals, candle patterns, multi-timeframe, adaptive MAs)
- None beat Williams %R Daily on out-of-sample Calmar
- L1 logistic regression and Lasso decode confirmed Williams entries are not filterable ex-ante — the edge is irreducible
- The "edge" is positive autocorrelation in AUDUSD daily returns, likely China/iron-ore commodity-cycle driven (multi-pair test confirmed AUDUSD is structurally 10-30× stronger than EUR/GBP/JPY/CAD/CHF on this pattern)
Audit trail
- Strategy file:
/home/ubuntu/live_trade/lab4_code/lab4_trader.py
- State persistence:
~/live_trade/lab4/AUD_v1/state.json
- Immutable event log:
~/live_trade/lab4/AUD_v1/events.csv
- Cron log:
~/live_trade/lab4/AUD_v1/cron.log
- Pre-Williams backup:
lab4_trader.py.pre_williams.bak (2026-05-07 14:30 UTC swap)
- Email alerts on entries, exits, errors via Gmail SMTP