feat: apply #33B impulse trail + #34A skip hours 9,21 WIB

#33B Impulse Trail (position_manager.py):
- Tighten trailing SL to 1.5x ATR when candle range > 1.5x ATR
- Locks profit faster during volatile spikes (+$59, Sharpe 4.03)

#34A Time-of-Hour Filter (main_live.py):
- Skip entries at WIB hours 9 (02:00 UTC) and 21 (14:00 UTC)
- Hour 9 = end NY session (low liquidity), Hour 21 = London-NY transition (whipsaw)
- +$356 vs #31B, WR 82.6%, Sharpe 4.41, PF 2.43, DD 2.4%

Cumulative live: $3,163 net, 614 trades, 82.6% WR, Sharpe 4.41

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
GifariKemal
2026-02-08 12:55:34 +07:00
co-authored by Claude Opus 4.6
parent 214b64945d
commit cb41bfe5ba
4 changed files with 2136 additions and 2 deletions
+9
View File
@@ -932,6 +932,15 @@ class TradingBot:
logger.info(f"H1 Filter: {final_signal.signal_type} blocked (H1=NEUTRAL)")
return
# 10.2 Time-of-Hour Filter (#34A: skip WIB hours 9 and 21 — backtest +$356)
# Hour 9 WIB (02:00 UTC) = end of NY session, low liquidity
# Hour 21 WIB (14:00 UTC) = London-NY transition, whipsaw prone
from zoneinfo import ZoneInfo
wib_hour = datetime.now(ZoneInfo("Asia/Jakarta")).hour
if wib_hour in (9, 21):
logger.info(f"Time Filter: {final_signal.signal_type} blocked (WIB hour {wib_hour} is skip hour)")
return
# 10.5 Check trade cooldown
if self._last_trade_time:
time_since_last = (datetime.now() - self._last_trade_time).total_seconds()