Fix Wallet balances
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user