feat: add 5 dashboard features — dark mode, trade history, backtests, model insights, alerts

- Dark mode: class-based theme toggle with localStorage persistence and flash prevention
- Trade History (/trades): paginated table, stats cards, equity curve chart with DB API endpoints
- Backtest Viewer (/backtests): log parser for 35 backtest results, sidebar + detail + comparison tabs
- Model Insights: dashboard card + dialog showing feature importance, regime distribution, training history
- Alert/Signal Log (/alerts): signal stats, filterable table with execution tracking
- API: 8 new endpoints with psycopg2 DB connection pool
- Dark mode sweep across books page, about dialog, and all dashboard components
- Architecture docs rewritten with Mermaid diagrams (23 docs)
- README and FEATURES.md rewritten bilingual (Indonesian + English)
- main_live.py: write model_metrics.json on startup and retrain

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
GifariKemal
2026-02-09 05:46:54 +07:00
co-authored by Claude Opus 4.6
parent b2dc2dacd7
commit e8355b3f62
230 changed files with 69573 additions and 5673 deletions
@@ -0,0 +1,31 @@
================================================================================
XAUBOT AI — #19 Session Optimize (B: skip_TL)
================================================================================
Period: 2025-08-01 to 2026-02-07
Session blocked: 220
Trades: 471 | WR: 46.7%
Net PnL: $145.78 | PF: 1.34
Max DD: 0.8% | Sharpe: 1.47
Avg Win: $2.63 | Avg Loss: $1.73
--- SESSION BREAKDOWN ---
NY Session : 108 trades, 47.2% WR, $ 71.07
London Early : 71 trades, 50.7% WR, $ 60.03
London-NY Overlap (Golden) : 95 trades, 49.5% WR, $ 21.34
Sydney-Tokyo : 197 trades, 43.7% WR, $ -6.67
--- DIRECTION ---
BUY: 276 trades, 50.0% WR, $77.32
SELL: 195 trades, 42.1% WR, $68.46
--- EXIT REASONS ---
timeout : 206 ( 43.7%)
max_loss : 101 ( 21.4%)
take_profit : 93 ( 19.7%)
weekend_close : 20 ( 4.2%)
smart_tp : 19 ( 4.0%)
market_signal : 15 ( 3.2%)
breakeven_exit : 8 ( 1.7%)
peak_protect : 5 ( 1.1%)
trailing_sl : 4 ( 0.8%)
@@ -0,0 +1,33 @@
================================================================================
XAUBOT AI — #19 Session Optimize (B: skip_TL)
================================================================================
Period: 2025-08-01 to 2026-02-07
Session blocked: 420
Trades: 683 | WR: 73.4%
Net PnL: $1,794.94 | PF: 1.54
Max DD: 5.2% | Sharpe: 2.41
Avg Win: $10.22 | Avg Loss: $18.26
--- SESSION BREAKDOWN ---
Sydney-Tokyo : 282 trades, 76.2% WR, $ 773.44
London-NY Overlap (Golden) : 152 trades, 73.7% WR, $ 563.58
NY Session : 144 trades, 71.5% WR, $ 492.34
London Early : 105 trades, 67.6% WR, $ -34.43
--- DIRECTION ---
BUY: 399 trades, 75.2% WR, $1,425.67
SELL: 284 trades, 70.8% WR, $369.27
--- EXIT REASONS ---
breakeven_exit : 243 ( 35.6%)
trailing_sl : 177 ( 25.9%)
early_cut : 85 ( 12.4%)
trend_reversal : 47 ( 6.9%)
take_profit : 37 ( 5.4%)
max_loss : 24 ( 3.5%)
smart_tp : 19 ( 2.8%)
timeout : 18 ( 2.6%)
weekend_close : 13 ( 1.9%)
market_signal : 11 ( 1.6%)
peak_protect : 9 ( 1.3%)