Improve test accuracy

This commit is contained in:
Matthias
2023-03-05 19:45:04 +01:00
parent 9d285e3dc0
commit cab1b750b3
2 changed files with 8 additions and 3 deletions

View File

@@ -192,7 +192,7 @@ class RPC:
current_profit = trade.close_profit or 0.0
current_profit_abs = trade.close_profit_abs or 0.0
total_profit_abs = trade.realized_profit + current_profit_abs
total_profit_ratio = 0.0
total_profit_ratio: Optional[float] = None
if trade.max_stake_amount:
total_profit_ratio = (
(total_profit_abs / trade.max_stake_amount) * trade.leverage