Remove unnecessary check and condition

This commit is contained in:
Matthias 2022-06-13 20:48:49 +02:00
parent 1ffee96bad
commit 01a68e1060

View File

@ -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