diff --git a/vn.trader/ctaAlgo/ctaSetting.py b/vn.trader/ctaAlgo/ctaSetting.py index 81816b76..9115e9d2 100644 --- a/vn.trader/ctaAlgo/ctaSetting.py +++ b/vn.trader/ctaAlgo/ctaSetting.py @@ -8,9 +8,7 @@ 在CTA_setting.json中写入具体每个策略对象的类和合约设置。 ''' -from ctaTemplate import DataRecorder from ctaDemo import DoubleEmaDemo STRATEGY_CLASS = {} -STRATEGY_CLASS['DataRecorder'] = DataRecorder STRATEGY_CLASS['DoubleEmaDemo'] = DoubleEmaDemo \ No newline at end of file diff --git a/vn.trader/ltsGateway/ltsGateway.py b/vn.trader/ltsGateway/ltsGateway.py index d3fa3ea3..26b00d78 100644 --- a/vn.trader/ltsGateway/ltsGateway.py +++ b/vn.trader/ltsGateway/ltsGateway.py @@ -193,7 +193,7 @@ class LtsGateway(VtGateway): ######################################################################## -class LtsMdApi(MdApi): +class LtsMdApi(MdApi): """Lts行情API实现""" #---------------------------------------------------------------------- @@ -733,6 +733,10 @@ class LtsTdApi(TdApi): os.makedirs(path) self.createFtdcTraderApi(path) + # 设置数据同步模式为推送从今日开始所有数据 + self.subscribePrivateTopic(0) + self.subscribePublicTopic(0) + # 注册服务器地址 self.registerFront(self.address)