mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-07 17:27:45 +00:00
testdata
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user