Fix test for trading metrics
This commit is contained in:
@@ -487,6 +487,7 @@ public static class TradingBox
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the total volume traded across all positions
|
||||
/// Only includes valid positions (Filled, Finished, Flipped) - excludes New, Canceled, Rejected
|
||||
/// </summary>
|
||||
/// <param name="positions">List of positions to analyze</param>
|
||||
/// <returns>The total volume traded in decimal</returns>
|
||||
@@ -496,6 +497,12 @@ public static class TradingBox
|
||||
|
||||
foreach (var position in positions)
|
||||
{
|
||||
// Only count volume for valid positions (Filled, Finished, Flipped)
|
||||
if (!position.IsValidForMetrics())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add entry volume
|
||||
totalVolume += position.Open.Quantity * position.Open.Price * position.Open.Leverage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user