Fix Wallet balances

This commit is contained in:
2025-07-17 22:29:13 +07:00
parent 0ea05bca50
commit 03a4e179f7
2 changed files with 3 additions and 2 deletions

View File

@@ -1313,7 +1313,7 @@ public class TradingBot : Bot, ITradingBot
public decimal GetProfitAndLoss()
{
var pnl = Positions.Where(p => p.ProfitAndLoss != null).Sum(p => p.ProfitAndLoss.Realized);
var pnl = Positions.Where(p => p.ProfitAndLoss != null && p.IsFinished()).Sum(p => p.ProfitAndLoss.Realized);
return pnl - GetTotalFees();
}