Only look at buy orders when looking to recalculate trade value

This commit is contained in:
Matthias 2022-01-30 14:07:21 +01:00
parent aea84dc117
commit 7aae9565c7

View File

@ -569,8 +569,8 @@ class LocalTrade():
return float(f"{profit_ratio:.8f}")
def recalc_trade_from_orders(self):
# We need at least 2 orders for averaging amounts and rates.
if len(self.orders) < 2:
# We need at least 2 entry orders for averaging amounts and rates.
if len(self.select_filled_orders('buy')) < 2:
# Just in case, still recalc open trade value
self.recalc_open_trade_value()
return