This commit is contained in:
vn.py 2019-03-17 13:11:33 +08:00
parent 5a6f496cb1
commit 57fc77a1b0

View File

@ -9,6 +9,7 @@ from typing import Any, Callable
from datetime import datetime, timedelta from datetime import datetime, timedelta
from threading import Thread from threading import Thread
from queue import Queue from queue import Queue
from copy import copy
import rqdatac import rqdatac
@ -203,7 +204,7 @@ class CtaEngine(BaseEngine):
def check_stop_order(self, tick: TickData): def check_stop_order(self, tick: TickData):
"""""" """"""
for stop_order in self.stop_orders.values(): for stop_order in list(self.stop_orders.values()):
if stop_order.vt_symbol != tick.vt_symbol: if stop_order.vt_symbol != tick.vt_symbol:
continue continue
@ -385,7 +386,7 @@ class CtaEngine(BaseEngine):
if not vt_orderids: if not vt_orderids:
return return
for vt_orderid in vt_orderids: for vt_orderid in copy(vt_orderids):
self.cancel_order(strategy, vt_orderid) self.cancel_order(strategy, vt_orderid)
def get_engine_type(self): def get_engine_type(self):