feat: apply #28B smart breakeven + #31B H1 EMA20 filter, add backtests #26-#32

Live trading optimizations (cumulative: $2,807 net, 81.8% WR, Sharpe 3.97):
- #28B: Smart breakeven locks profit at entry + 0.5x ATR instead of fixed $2
- #31B: H1 Price vs EMA20 filter — BUY only when H1 bullish, SELL only when bearish

Backtests #26-#32 (7 scripts testing sell improvement, regime-aware entry,
confluence scoring, dynamic RR, multi-TF H1, and ML exit optimizer).
Winners: #28B (+$229), #31B (+$343). Failed: #26, #27, #29, #30, #32.

Also includes: web dashboard redesign, Docker setup, startup scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
buckybonez
2026-02-08 10:33:24 +07:00
co-authored by Claude Opus 4.6
parent a8d01995ab
commit 82eca84230
64 changed files with 11073 additions and 929 deletions
+3 -2
View File
@@ -554,9 +554,10 @@ class SmartPositionManager:
trail_start = self.trail_start_pips
trail_step = self.trail_step_pips
# 5. Breakeven protection
# 5. Breakeven protection (#28B: smart BE locks profit at 0.5*ATR instead of fixed $2)
if pip_profit >= be_pips and current_sl != 0:
breakeven_sl = entry_price + (1 if is_buy else -1) * 2 # 2 points buffer
be_lock_distance = current_atr * 0.5 if (current_atr is not None and current_atr > 0) else 2.0
breakeven_sl = entry_price + (1 if is_buy else -1) * be_lock_distance
if is_buy and current_sl < breakeven_sl:
return PositionAction(