Add M5 gates 5-6 and trailing-stop exits (+48R → +105R on 12mo)
Gates 5-6 in the M5 filter: block 'high' vol regime entries (chop transition — 61% WR, negative total while low/normal/extreme all positive) and block SELLs with RSI<25 (dip already extended, mean- reverts before target). 365d: 419→311 trades, +41→+48.4R, DD 11.2→8.0R. Replace the fixed RR-0.5 take-profit with a trailing stop: arm at +0.6R favorable excursion, trail 0.75R behind best price, stop levels update at bar close (conservative). The RR-0.5 target was the binding constraint — winners kept running after TP. Whole trail parameter grid (arm 0.4-1.2 × dist 0.5-1.25) lands +90-103R, a plateau not a spike; also +91.7R on the pre-gate 419-trade population. TP1 stays advisory; Telegram alerts include the arm price and trail distance. max_hold 200→300 bars (trailing exits need room; +10R). 12mo M5, same 311 trades: +105.0R total, PF 2.27, DD 7.9R, 61% WR, train/val +54.6/+50.4, every quarter positive.
This commit is contained in:
@@ -138,6 +138,17 @@ class SignalConfig:
|
||||
# TP1 floor as a fraction of SL distance (0.5 = historical RR 0.5).
|
||||
tp_floor_rr: float = 0.5
|
||||
|
||||
# ── Trailing-stop exit (2026-07) ──────────────────────────────
|
||||
# Once favorable excursion reaches trail_arm_r × risk, the stop
|
||||
# trails trail_dist_r × risk behind the best price (updated at bar
|
||||
# close). TP1 becomes advisory — the trail is the exit. Validated
|
||||
# on 12mo M5: +105R vs +48R with the fixed RR-0.5 target, balanced
|
||||
# train/val, positive every quarter, PF 2.27. The RR-0.5 target was
|
||||
# the binding constraint — winners kept running after TP.
|
||||
# Set trail_arm_r = 0 to disable and exit at TP1 as before.
|
||||
trail_arm_r: float = 0.6
|
||||
trail_dist_r: float = 0.75
|
||||
|
||||
|
||||
@dataclass
|
||||
class NewsConfig:
|
||||
@@ -193,6 +204,14 @@ class XauStrategyConfig:
|
||||
# the ATR-based setup generator; B-grade swing setups survive
|
||||
# because they catch moderate drops, not extremes.
|
||||
m5_sell_max_quality: List[str] = field(default_factory=lambda: ["B", "C"])
|
||||
# 'high' vol regime on M5 is chop transition — elevated noise
|
||||
# without directional expansion. 61% WR / negative total across
|
||||
# 12mo while low/normal/extreme are all positive (validated 2026-07).
|
||||
m5_blocked_vol_regimes: List[str] = field(default_factory=lambda: ["high"])
|
||||
# Block M5 SELLs when RSI is already < this floor: the dip is
|
||||
# extended and mean-reverts before the target (negative in both
|
||||
# halves of 6mo and 12mo backtests).
|
||||
m5_sell_min_rsi: float = 25.0
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user