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

@@ -526,6 +526,7 @@ public static class TradingBox
/// <summary>
/// Gets the win/loss counts from positions
/// Counts all positions including open ones based on their current PnL
/// </summary>
/// <param name="positions">List of positions to analyze</param>
/// <returns>A tuple containing (wins, losses)</returns>
@@ -540,7 +541,7 @@ public static class TradingBox
{
wins++;
}
else
else if (position.ProfitAndLoss != null && position.ProfitAndLoss.Realized <= 0)
{
losses++;
}