def __init__(self): """Constructor""" # 记录今日日期 self.todayDate = datetime.now().strftime('%Y%m%d') # 创建事件引擎 self.eventEngine = EventEngine2() self.eventEngine.start() # 创建数据引擎 self.dataEngine = DataEngine(self, self.eventEngine) # MongoDB数据库相关 self.dbClient = None # MongoDB客户端对象 # 接口实例 self.gatewayDict = OrderedDict() self.gatewayDetailList = [] # 应用模块实例 self.appDict = OrderedDict() self.appDetailList = [] # 扩展模块 self.ctaEngine = CtaEngine(self, self.eventEngine) # cta策略运行模块 self.drEngine = DrEngine(self, self.eventEngine) # 数据记录模块 self.rmEngine = RmEngine(self, self.eventEngine) # 风险管理模块 self.connected_gw_name = u''
def __init__(self, client, eventEngine): """Constructor""" self.client = client self.eventEngine = eventEngine # 扩展模块 self.ctaEngine = CtaEngine(self, self.eventEngine) self.drEngine = DrEngine(self, self.eventEngine) self.rmEngine = RmEngine(self, self.eventEngine)