Don't recalculate profit_abs twice

This commit is contained in:
Matthias
2025-04-06 19:55:22 +02:00
parent 4986f356ee
commit 9acf8943ed

View File

@@ -1162,11 +1162,12 @@ class LocalTrade:
) )
total_profit_ratio = float(f"{total_profit_ratio:.8f}") total_profit_ratio = float(f"{total_profit_ratio:.8f}")
profit_abs = float(f"{profit_abs:.8f}") profit_abs = float(f"{profit_abs:.8f}")
total_profit_abs = float(f"{total_profit_abs:.8f}")
return ProfitStruct( return ProfitStruct(
profit_abs=profit_abs, profit_abs=profit_abs,
profit_ratio=profit_ratio, profit_ratio=profit_ratio,
total_profit=profit_abs + self.realized_profit, total_profit=total_profit_abs,
total_profit_ratio=total_profit_ratio, total_profit_ratio=total_profit_ratio,
) )