From 01a68e1060bf0c7a30a8fc9732d035547f7dd11c Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 13 Jun 2022 20:48:49 +0200 Subject: [PATCH] Remove unnecessary check and condition --- freqtrade/persistence/trade_model.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/freqtrade/persistence/trade_model.py b/freqtrade/persistence/trade_model.py index 79f58591d..3222a57b8 100644 --- a/freqtrade/persistence/trade_model.py +++ b/freqtrade/persistence/trade_model.py @@ -828,14 +828,6 @@ class LocalTrade(): return float(f"{profit_ratio:.8f}") def recalc_trade_from_orders(self): - # We need at least 2 entry orders for averaging amounts and rates. - # TODO: this condition could probably be removed - if len(self.select_filled_orders(self.entry_side)) < 2: - self.stake_amount = self.amount * self.open_rate / self.leverage - - # Just in case, still recalc open trade value - self.recalc_open_trade_value() - return total_amount = 0.0 total_stake = 0.0