mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
add has_open_entry_orders property to trade
This commit is contained in:
parent
6752c3e288
commit
05cf4cab8e
|
@ -544,6 +544,17 @@ class LocalTrade:
|
||||||
]
|
]
|
||||||
return len(open_orders_wo_sl) > 0
|
return len(open_orders_wo_sl) > 0
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_open_entry_orders(self) -> bool:
|
||||||
|
"""
|
||||||
|
True if there are open entry orders for this trade
|
||||||
|
"""
|
||||||
|
open_entry_orders = [
|
||||||
|
o for o in self.orders
|
||||||
|
if o.ft_order_side == self.entry_side and o.ft_is_open
|
||||||
|
]
|
||||||
|
return len(open_entry_orders) > 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_open_position(self) -> bool:
|
def has_open_position(self) -> bool:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user