Refactor BacktestExecutor to use net PnL calculations consistently across methods. Updated variable names for clarity and ensured final results reflect net profit after fees. Minor adjustment in TradingBotBase to directly access net PnL from position profit and loss.

This commit is contained in:
2025-11-13 11:56:11 +07:00
parent d8f7a73605
commit 2cc6cc5dee
3 changed files with 7 additions and 6 deletions

View File

@@ -2132,7 +2132,7 @@ public class TradingBotBase : ITradingBot
{
if (position.IsValidForMetrics() && position.ProfitAndLoss != null)
{
netPnl += position.GetPnLBeforeFees();
netPnl += position.ProfitAndLoss.Net;
}
}