feat: Add P&L Tracking with automatic MT5 history import (V1.9)
Added comprehensive P&L tracking system with automatic MT5 history import: New Features: - Automatic MT5 history sync (hourly) - Entry+Exit deal matching for complete positions - Real P&L calculation (profit + commission + swap) - Real Win Rate from closed MT5 trades - Multi-period analysis (Today, Week, Month, All-Time) - Live performance dashboard - Performance metrics (Profit Factor, Max Drawdown, Win/Loss Ratio) - Recent trades display Files Added: - mt5_pnl_tracker.py: Core P&L tracking module (950 lines) - integrate_pnl_tracker.py: Notebook integration script - PNL_TRACKER_GUIDE.md: Complete documentation - PNL_QUICK_START.md: 3-step quick start guide - BOT_IMPROVEMENTS_SUMMARY.md: Complete improvements timeline Notebook Changes: - Added Cells 85-90 (6 new cells for P&L tracking) - Cell 85: Section header (Markdown) - Cell 86: Setup P&L tracker - Cell 87: Initial MT5 history sync - Cell 88: Add P&L sync to scheduler - Cell 89: Usage instructions (Markdown) - Cell 90: Live dashboard display Scheduler: - Added pnl_sync job (every 1 hour) - Automatically imports last 7 days from MT5 - Matches Entry/Exit deals - Calculates real P&L Database: - mt5_deals table: Raw MT5 deals - matched_positions table: Complete trades (Entry+Exit) - pnl_summary table: Aggregated metrics Benefits: - Know real Win Rate (not estimates) - Track actual profit/loss accurately - Validate strategy performance - Data-driven threshold optimization - Performance trend analysis Total Cells: 85 → 91 Version: V1.6 → V1.9 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0a1ff55857
commit
4f47b8e2fe
8 files changed
+3157
-2
No files matched your search
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"timestamp": "2026-01-21T00:00:02.545761",
|
||||
"session_thresholds": {
|
||||
"asian": 60,
|
||||
"ny": 60,
|
||||
"london": 95,
|
||||
"overlap": 70
|
||||
},
|
||||
"settings": {
|
||||
"lookback_trades": 20,
|
||||
"target_win_rate": 0.6,
|
||||
"min_threshold": 60,
|
||||
"max_threshold": 95
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user