Optimize EUR/USD M5 signals: 1:1 RR, vol/agreement filters, disable XAU

Tune EUR/USD M5 trade setup for balanced profitability (78% WR, 1.68 PF,
+26.5R over 365d) under a 4-hour max hold constraint. Key changes:
- Raise min RR from 0.5 to 1.0 and TP multiplier from 1.0x to 1.2x ATR
- Tighten SL floor (0.8→0.7 ATR) and swing lookback (50→20 bars)
- Add volatility regime filter (block "high" vol) and min 6 indicator
  agreement gate in signal_aggregator
- Raise BE trigger 0.2→0.3R, buffer 0.05→0.15R to let winners run
- Block weak hours (06, 09, 11 UTC) on M5
- Disable XAU strategy checks by default; XAU pair config re-enables

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
harwinder
2026-05-21 19:12:58 -04:00
parent 9a2b1f7b1e
commit 25791fefa3
5 changed files with 38 additions and 11 deletions
+4 -4
View File
@@ -190,7 +190,7 @@ def _():
@test("XauStrategyConfig defaults")
def _():
xc = XauStrategyConfig()
assert xc.enabled is True
assert xc.enabled is False
assert xc.rsi_entry_threshold == 45.0
assert xc.min_ema200_tfs == 2
assert xc.allow_generic_trades is True
@@ -1656,7 +1656,7 @@ def _():
assert 6 not in cfg.allowed_weekdays # No Sunday
assert cfg.min_atr_threshold == 0.0003
assert cfg.sl_atr_floor == 1.2
assert cfg.min_rr_ratio == 0.5
assert cfg.min_rr_ratio == 1.0
assert cfg.mature_move_threshold == 35.0
assert cfg.tp_quality_scale["A+"] == 1.0
assert cfg.tp_quality_scale["A"] == 1.0
@@ -1755,13 +1755,13 @@ def _():
config.eur_strategy.blocked_regimes = []
config.eur_strategy.min_quality_grades = []
assert config.eur_strategy.sl_atr_floor == 1.2
assert config.eur_strategy.min_rr_ratio == 0.5
assert config.eur_strategy.min_rr_ratio == 1.0
agg = SignalAggregator(config)
df = make_ohlcv(n=300, start_price=1.0800, trend=0.0003, seed=77)
dfs = {Timeframe.H1: df, Timeframe.M15: df, Timeframe.H4: df}
report = agg.analyze_from_dataframes(symbol=EURUSD, dfs=dfs, use_news=False)
if report.trade_setup:
assert report.trade_setup.risk_reward >= 0.5 - 0.01
assert report.trade_setup.risk_reward >= 1.0 - 0.01
# ══════════════════════════════════════════════════════════════════════