Fix win and loses count
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user