mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-11 16:50:40 +00:00
Fix logic error in force_exit if no order is open
This commit is contained in:
@@ -304,7 +304,6 @@ class TradeSchema(BaseModel):
|
||||
|
||||
min_rate: Optional[float] = None
|
||||
max_rate: Optional[float] = None
|
||||
open_order_id: Optional[str] = None
|
||||
orders: List[OrderSchema]
|
||||
|
||||
leverage: Optional[float] = None
|
||||
|
||||
@@ -786,7 +786,7 @@ class RPC:
|
||||
self._freqtrade.handle_cancel_exit(
|
||||
trade, order, oo.order_id, CANCEL_REASON['FORCE_EXIT'])
|
||||
|
||||
if any(not tocr['cancel_state'] for tocr in trade_entry_cancelation_registry):
|
||||
if all(tocr['cancel_state'] for tocr in trade_entry_cancelation_registry):
|
||||
if trade.has_open_orders:
|
||||
# Order cancellation failed, so we can't exit.
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user