Extract backtest order closing to models class

This commit is contained in:
Matthias
2022-01-30 15:44:13 +01:00
parent 090554f197
commit 7ac44380f7
2 changed files with 9 additions and 11 deletions

View File

@@ -188,6 +188,12 @@ class Order(_DECL_BASE):
'status': self.status,
}
def close_bt_order(self, close_date: datetime):
self.order_filled_date = close_date
self.filled = self.amount
self.status = 'closed'
self.ft_is_open = False
@staticmethod
def update_orders(orders: List['Order'], order: Dict[str, Any]):
"""