This commit is contained in:
Ichinga Samuel
2024-09-10 17:45:36 +01:00
parent 8928bcaab8
commit a10faf5e60
2 changed files with 1 additions and 6 deletions
@@ -29,8 +29,7 @@ class EventManager:
self.tasks.extend(task)
def sigint_handler(self, sig, frame):
for task in self.tasks:
task.cancel() if not task.done() else ...
print(self.config.test_data)
async def acquire(self):
await self.condition.acquire()
@@ -45,7 +44,6 @@ class EventManager:
self.task_tracker = 0
await self.config.test_data.tracker()
self.config.test_data.next()
print(self.config.test_data.cursor.time)
self.condition.notify_all()
await asyncio.sleep(0)
@@ -84,8 +84,6 @@ class TestData:
await asyncio.gather(*order_tasks)
def save(self):
self._data.history_deals = self.history_deals
self._data.history_orders = self.history_orders
for symbol in self.orders:
self.history_orders = pd.concat([DataFrame(self.orders[symbol].values()), self.history_orders])
self._data.history_orders = self.history_orders
@@ -131,7 +129,6 @@ class TestData:
order = self.open_orders.pop(ticket)
order = order._asdict()
order.update(time_done=self.cursor.time)
self.orders[order['symbol']][ticket] = TradeOrder(order)
self.update_account(profit=position.profit, margin=-margin)
def modify_stops(self, ticket: int, sl: int = None, tp: int = None):