mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Don't recalculate profit_abs twice
This commit is contained in:
@@ -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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user