Botcomparison summary shouldn't contain non-selected bots

This commit is contained in:
Matthias 2023-08-09 07:26:36 +02:00
parent a064b96ed9
commit 88469104ca

View File

@ -122,11 +122,14 @@ const tableItems = computed<TableItem[]>(() => {
stakeCurrencyDecimals: botStore.allBotState[k]?.stake_currency_decimals || 3, stakeCurrencyDecimals: botStore.allBotState[k]?.stake_currency_decimals || 3,
}); });
if (v.profit_closed_coin !== undefined) { if (v.profit_closed_coin !== undefined) {
summary.profitClosed += v.profit_closed_coin; if (botStore.botStores[k].isSelected) {
summary.profitOpen += profitOpen; // Summary should only include selected bots
summary.wins += v.winning_trades; summary.profitClosed += v.profit_closed_coin;
summary.losses += v.losing_trades; summary.profitOpen += profitOpen;
// summary.decimals = this.allBotState[k]?.stake_currency_decimals || summary.decimals; summary.wins += v.winning_trades;
summary.losses += v.losing_trades;
// summary.decimals = this.allBotState[k]?.stake_currency_decimals || summary.decimals;
}
} }
}); });
val.push(summary); val.push(summary);