diff --git a/vn.trader/dataRecorder/uiDrWidget.py b/vn.trader/dataRecorder/uiDrWidget.py index cf900459..b9a21190 100644 --- a/vn.trader/dataRecorder/uiDrWidget.py +++ b/vn.trader/dataRecorder/uiDrWidget.py @@ -119,26 +119,26 @@ class DrEngineManager(QtGui.QWidget): def updateSetting(self): """显示引擎行情记录配置""" with open(self.drEngine.settingFileName) as f: - setting = json.load(f) + drSetting = json.load(f) - if 'tick' in setting: - l = setting['tick'] + if 'tick' in drSetting: + l = drSetting['tick'] for setting in l: self.tickTable.insertRow(0) self.tickTable.setItem(0, 0, TableCell(setting[0])) self.tickTable.setItem(0, 1, TableCell(setting[1])) - if 'bar' in setting: - l = setting['bar'] + if 'bar' in drSetting: + l = drSetting['bar'] for setting in l: self.barTable.insertRow(0) self.barTable.setItem(0, 0, TableCell(setting[0])) self.barTable.setItem(0, 1, TableCell(setting[1])) - if 'active' in setting: - d = setting['active'] + if 'active' in drSetting: + d = drSetting['active'] for activeSymbol, symbol in d.items(): self.activeTable.insertRow(0) diff --git a/vn.trader/ibGateway/ibGateway.py b/vn.trader/ibGateway/ibGateway.py index 1cf90b79..66142aa3 100644 --- a/vn.trader/ibGateway/ibGateway.py +++ b/vn.trader/ibGateway/ibGateway.py @@ -250,6 +250,10 @@ class IbGateway(VtGateway): # 查询下一个有效编号 self.connection.reqIds(1) + + # 返回委托编号 + vtOrderID = '.'.join([self.gatewayName, str(self.orderId)]) + return vtOrderID #---------------------------------------------------------------------- def cancelOrder(self, cancelOrderReq):