Fix status and filtered positions for metrics

This commit is contained in:
2025-10-08 18:37:38 +07:00
parent 86dd6849ea
commit 76b087a6e4
8 changed files with 57 additions and 89 deletions

View File

@@ -141,7 +141,7 @@ namespace Managing.Domain.Trades
/// Gets the net PnL after deducting fees
/// </summary>
/// <returns>The net PnL after fees</returns>
public decimal GetNetPnL()
public decimal GetPnLBeforeFees()
{
if (ProfitAndLoss?.Realized == null)
{
@@ -151,6 +151,16 @@ namespace Managing.Domain.Trades
return ProfitAndLoss.Realized;
}
public decimal GetNetPnl()
{
if (ProfitAndLoss?.Net == null)
{
return 0;
}
return ProfitAndLoss.Realized - UiFees - GasFees;
}
/// <summary>
/// Updates the UI fees for this position
/// </summary>