- Created persistent learning status API with trading statistics - Added comprehensive PnL and win rate display to AI Learning panel - Implemented trading stats tracking with win/loss ratios - Added persistent data storage for historical trading performance - Enhanced learning panel with real-time trading metrics - Fixed learning data visibility when bot is not running - Added sample trading data for demonstration
54 lines
1.1 KiB
JSON
54 lines
1.1 KiB
JSON
{
|
|
"totalTrades": 47,
|
|
"winningTrades": 28,
|
|
"losingTrades": 19,
|
|
"totalPnL": 342.75,
|
|
"winRate": 59.57,
|
|
"avgWinAmount": 18.45,
|
|
"avgLossAmount": -12.30,
|
|
"bestTrade": 89.50,
|
|
"worstTrade": -35.20,
|
|
"learningDecisions": 156,
|
|
"aiEnhancements": 23,
|
|
"riskThresholds": {
|
|
"emergency": 3,
|
|
"risk": 5,
|
|
"mediumRisk": 8
|
|
},
|
|
"lastUpdated": "2025-07-27T10:45:00.000Z",
|
|
"systemStatus": "learning",
|
|
"dataCollected": true,
|
|
"recentTrades": [
|
|
{
|
|
"id": "trade_1753612001_abc123",
|
|
"symbol": "SOLUSD",
|
|
"type": "LONG",
|
|
"entry": 186.45,
|
|
"exit": 189.20,
|
|
"pnl": 15.75,
|
|
"outcome": "WIN",
|
|
"timestamp": "2025-07-27T09:30:00.000Z"
|
|
},
|
|
{
|
|
"id": "trade_1753612002_def456",
|
|
"symbol": "SOLUSD",
|
|
"type": "LONG",
|
|
"entry": 184.80,
|
|
"exit": 182.15,
|
|
"pnl": -8.95,
|
|
"outcome": "LOSS",
|
|
"timestamp": "2025-07-27T08:15:00.000Z"
|
|
},
|
|
{
|
|
"id": "trade_1753612003_ghi789",
|
|
"symbol": "SOLUSD",
|
|
"type": "LONG",
|
|
"entry": 187.30,
|
|
"exit": 195.80,
|
|
"pnl": 42.50,
|
|
"outcome": "WIN",
|
|
"timestamp": "2025-07-27T07:45:00.000Z"
|
|
}
|
|
]
|
|
}
|