Fix status and filtered positions for metrics
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user