remove unused properties

This commit is contained in:
Axel-CH 2024-09-24 11:11:42 -04:00
parent 418356f383
commit bb4db022f0

View File

@ -586,16 +586,6 @@ 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:
"""
@ -609,31 +599,6 @@ class LocalTrade:
return (entry_orders_filled_qty - exit_orders_filled_qty) > 0
@property
def untied_assets(self) -> float:
entry_orders = [o for o in self.orders if o.ft_order_side == self.entry_side]
entry_orders_filled_qty = sum(eno.safe_filled for eno in entry_orders)
exit_orders = [o for o in self.orders if o.ft_order_side == self.exit_side]
exit_orders_remaining_qty = sum(exo.safe_remaining for exo in exit_orders)
untied_remaining = entry_orders_filled_qty - exit_orders_remaining_qty
logger.info(f"entry_orders: {entry_orders}")
logger.info(f"exit_orders: {exit_orders}")
logger.info(f"entry_orders_filled_qty: {entry_orders_filled_qty}")
logger.info(f"exit_orders_remaining_qty: {exit_orders_remaining_qty}")
logger.info(f"untied_remaining: {untied_remaining}")
return untied_remaining
@property
def has_untied_assets(self) -> bool:
"""
True if there is still remaining position not yet tied up to exit order
"""
return self.untied_assets > 0
@property
def open_sl_orders(self) -> List[Order]:
"""