Fix agent volume
This commit is contained in:
@@ -9,6 +9,7 @@ using Managing.Common;
|
||||
using Managing.Core;
|
||||
using Managing.Core.Exceptions;
|
||||
using Managing.Domain.Bots;
|
||||
using Managing.Domain.Shared.Helpers;
|
||||
using Managing.Domain.Statistics;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -174,7 +175,7 @@ public class AgentGrain : Grain, IAgentGrain
|
||||
|
||||
// Calculate aggregated statistics from position data
|
||||
var totalPnL = positions.Sum(p => p.ProfitAndLoss?.Realized ?? 0);
|
||||
var totalVolume = positions.Sum(p => p.Open.Price * p.Open.Quantity * p.Open.Leverage);
|
||||
var totalVolume = TradingBox.GetTotalVolumeTraded(positions);
|
||||
var collateral = positions.Sum(p => p.Open.Price * p.Open.Quantity);
|
||||
var totalFees = positions.Sum(p => p.CalculateTotalFees());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user