Fix win and loses count

This commit is contained in:
2025-10-05 03:21:59 +07:00
parent b25f0be083
commit faec7e2e5a
4 changed files with 11 additions and 8 deletions

View File

@@ -91,6 +91,7 @@ function AgentSearch({ index }: { index: number }) {
const calculateSummary = () => {
if (!agentData?.strategies.length) return null
console.log(agentData.strategies)
const totalPnL = agentData.strategies.reduce((sum, strategy) => sum + (strategy.pnL || 0), 0)
const totalNetPnL = agentData.strategies.reduce((sum, strategy) => sum + (strategy.netPnL || 0), 0)
const totalVolume = agentData.strategies.reduce((sum, strategy) => sum + (strategy.totalVolumeTraded || 0), 0)