From c47c27db51f671a58820640084ae11dc2970ce6b Mon Sep 17 00:00:00 2001 From: chenxy123 Date: Sun, 12 Jun 2016 18:13:19 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E7=A7=BB=E9=99=A4ctaSetting=E9=87=8C?= =?UTF-8?q?=E7=9A=84DataRecorder=202.=20LTS=E6=8E=A5=E5=8F=A3=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=9B=9E=E4=BC=A0=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/ctaAlgo/ctaSetting.py | 2 -- vn.trader/ltsGateway/ltsGateway.py | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) 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)