Full cancel only for non DCA trades.

This commit is contained in:
eSeR1805 2022-04-30 12:55:03 +03:00
parent 09089b160e
commit f9977c26e7
No known key found for this signature in database
GPG Key ID: BA53686259B46936

View File

@ -1194,7 +1194,7 @@ class FreqtradeBot(LoggingMixin):
full_cancel = False full_cancel = False
cancel_reason = constants.CANCEL_REASON['REPLACE'] cancel_reason = constants.CANCEL_REASON['REPLACE']
if not adjusted_entry_price: if not adjusted_entry_price:
full_cancel = True full_cancel = True if trade.nr_of_successful_entries == 0 else False
cancel_reason = constants.CANCEL_REASON['USER_CANCEL'] cancel_reason = constants.CANCEL_REASON['USER_CANCEL']
if order_obj.price != adjusted_entry_price: if order_obj.price != adjusted_entry_price:
# cancel existing order if new price is supplied or None # cancel existing order if new price is supplied or None