From 9f083dc0d836bc19c3f981a1e49af57b8b12b1bf Mon Sep 17 00:00:00 2001 From: chenxy123 Date: Tue, 17 May 2016 22:01:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DDataRecorder=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=BD=BD=E5=85=A5=E8=AE=BE=E7=BD=AE=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/dataRecorder/drEngine.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vn.trader/dataRecorder/drEngine.py b/vn.trader/dataRecorder/drEngine.py index fe3ba433..644dc0da 100644 --- a/vn.trader/dataRecorder/drEngine.py +++ b/vn.trader/dataRecorder/drEngine.py @@ -50,15 +50,15 @@ class DrEngine(object): def loadSetting(self): """载入设置""" with open(self.settingFileName) as f: - setting = json.load(f) + drSetting = json.load(f) # 如果working设为False则不启动行情记录功能 - working = setting['working'] + working = drSetting['working'] if not working: return - if 'tick' in setting: - l = setting['tick'] + if 'tick' in drSetting: + l = drSetting['tick'] for setting in l: symbol = setting[0] @@ -82,8 +82,8 @@ class DrEngine(object): drTick = DrTickData() # 该tick实例可以用于缓存部分数据(目前未使用) self.tickDict[vtSymbol] = drTick - if 'bar' in setting: - l = setting['bar'] + if 'bar' in drSetting: + l = drSetting['bar'] for setting in l: symbol = setting[0] @@ -105,8 +105,8 @@ class DrEngine(object): bar = DrBarData() self.barDict[vtSymbol] = bar - if 'active' in setting: - d = setting['active'] + if 'active' in drSetting: + d = drSetting['active'] # 注意这里的vtSymbol对于IB和LTS接口,应该后缀.交易所 for activeSymbol, vtSymbol in d.items():