fix: Remove fallback trading data from AI Learning Panel
- Fixed component showing mock data (1120 analyses, 66.7% win rate) instead of real data - Updated fallback logic to show empty/zero values when API fails instead of fake data - Dashboard will now display actual 9,413 analyses and real PATTERN RECOGNITION phase - Removed misleading fallback statistics that showed fake trading performance - Component now properly uses real AI learning API data when available The dashboard should now show the correct learning system status with real data.
This commit is contained in:
@@ -100,25 +100,28 @@ const EnhancedAILearningPanel = () => {
|
|||||||
|
|
||||||
const aiData = aiLearningData.success ? aiLearningData.data : {
|
const aiData = aiLearningData.success ? aiLearningData.data : {
|
||||||
// Fallback data when AI learning API is unavailable
|
// Fallback data when AI learning API is unavailable
|
||||||
|
totalAnalyses: 0,
|
||||||
|
totalDecisions: 0,
|
||||||
|
totalOutcomes: 0,
|
||||||
|
daysActive: 0,
|
||||||
|
avgAccuracy: 0,
|
||||||
|
winRate: 0,
|
||||||
|
confidenceLevel: 0,
|
||||||
|
phase: 'UNKNOWN',
|
||||||
|
nextMilestone: '',
|
||||||
|
recommendation: 'Learning API unavailable',
|
||||||
statistics: {
|
statistics: {
|
||||||
totalTrades: 15,
|
totalTrades: 0,
|
||||||
wins: 10,
|
wins: 0,
|
||||||
losses: 5,
|
losses: 0,
|
||||||
winRate: 66.7,
|
winRate: 0,
|
||||||
totalPnl: 55.66,
|
totalPnl: 0,
|
||||||
winsPnl: 56.72,
|
winsPnl: 0,
|
||||||
lossesPnl: -1.06,
|
lossesPnl: 0,
|
||||||
avgWin: 5.67,
|
avgWin: 0,
|
||||||
avgLoss: -0.21,
|
avgLoss: 0,
|
||||||
profitFactor: 26.75
|
profitFactor: 0
|
||||||
},
|
}
|
||||||
totalAnalyses: 1120,
|
|
||||||
avgAccuracy: 79.0,
|
|
||||||
confidenceLevel: 74.8,
|
|
||||||
phase: 'PATTERN RECOGNITION',
|
|
||||||
nextMilestone: 'Reach 65% win rate for advanced level',
|
|
||||||
recommendation: 'AI is learning patterns - maintain conservative position sizes',
|
|
||||||
daysActive: 9
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Merge current status with real AI learning data
|
// Merge current status with real AI learning data
|
||||||
@@ -183,26 +186,26 @@ const EnhancedAILearningPanel = () => {
|
|||||||
},
|
},
|
||||||
automationStatus: null,
|
automationStatus: null,
|
||||||
realTradingData: {
|
realTradingData: {
|
||||||
// Always provide fallback trading data
|
// Error fallback - show empty data
|
||||||
statistics: {
|
statistics: {
|
||||||
totalTrades: 15,
|
totalTrades: 0,
|
||||||
wins: 10,
|
wins: 0,
|
||||||
losses: 5,
|
losses: 0,
|
||||||
winRate: 66.7,
|
winRate: 0,
|
||||||
totalPnl: 55.66,
|
totalPnl: 0,
|
||||||
winsPnl: 56.72,
|
winsPnl: 0,
|
||||||
lossesPnl: -1.06,
|
lossesPnl: 0,
|
||||||
avgWin: 5.67,
|
avgWin: 0,
|
||||||
avgLoss: -0.21,
|
avgLoss: 0,
|
||||||
profitFactor: 26.75
|
profitFactor: 0
|
||||||
},
|
},
|
||||||
totalAnalyses: 1120,
|
totalAnalyses: 0,
|
||||||
avgAccuracy: 79.0,
|
avgAccuracy: 0,
|
||||||
confidenceLevel: 74.8,
|
confidenceLevel: 0,
|
||||||
phase: 'PATTERN RECOGNITION',
|
phase: 'ERROR',
|
||||||
nextMilestone: 'Reach 65% win rate for advanced level',
|
nextMilestone: 'Fix API connection',
|
||||||
recommendation: 'AI is learning patterns - maintain conservative position sizes',
|
recommendation: 'Learning system API unavailable',
|
||||||
daysActive: 9
|
daysActive: 0
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user