Properly close out orders in backtesting

This commit is contained in:
Matthias
2022-04-29 06:53:30 +02:00
parent c499bb051f
commit f709222943
2 changed files with 2 additions and 0 deletions

View File

@@ -166,6 +166,7 @@ class Order(_DECL_BASE):
def close_bt_order(self, close_date: datetime, trade: 'LocalTrade'):
self.order_filled_date = close_date
self.filled = self.amount
self.remaining = 0
self.status = 'closed'
self.ft_is_open = False
if (self.ft_order_side == trade.entry_side