add has_open_entry_orders property to trade

This commit is contained in:
Axel-CH 2024-04-15 15:18:39 -04:00
parent 6752c3e288
commit 05cf4cab8e

View File

@ -544,6 +544,17 @@ class LocalTrade:
]
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
def has_open_position(self) -> bool:
"""