diff --git a/vn.trader/riskManager/RM_setting.json b/vn.trader/riskManager/RM_setting.json index f687669b..ab0453d9 100644 --- a/vn.trader/riskManager/RM_setting.json +++ b/vn.trader/riskManager/RM_setting.json @@ -1,7 +1,7 @@ { "orderFlowClear": 1, - "workingOrderLimit": 0, - "tradeLimit": 200, + "workingOrderLimit": 20, + "tradeLimit": 100, "orderSizeLimit": 10, "active": true, "orderFlowLimit": 10 diff --git a/vn.trader/riskManager/rmEngine.py b/vn.trader/riskManager/rmEngine.py index 6f5fafc1..15982ca7 100644 --- a/vn.trader/riskManager/rmEngine.py +++ b/vn.trader/riskManager/rmEngine.py @@ -157,7 +157,7 @@ class RmEngine(object): return False # 检查总活动合约 - workingOrderCount = len(self.mainEngine.getAllWorkingOrders) + workingOrderCount = len(self.mainEngine.getAllWorkingOrders()) if workingOrderCount >= self.workingOrderLimit: self.writeRiskLog(u'当前活动委托数量%s,超过限制%s' %(workingOrderCount, self.workingOrderLimit)) diff --git a/vn.trader/riskManager/uiRmWidget.py b/vn.trader/riskManager/uiRmWidget.py index 251d5efa..66708b6e 100644 --- a/vn.trader/riskManager/uiRmWidget.py +++ b/vn.trader/riskManager/uiRmWidget.py @@ -17,10 +17,11 @@ class RmSpinBox(QtGui.QSpinBox): def __init__(self, value): """Constructor""" super(RmSpinBox, self).__init__() - self.setValue(value) - + self.setMinimum(0) self.setMaximum(1000000) + + self.setValue(value) @@ -107,6 +108,7 @@ class RmEngineManager(QtGui.QWidget): self.spinOrderFlowClear.valueChanged.connect(self.rmEngine.setOrderFlowClear) self.spinOrderSizeLimit.valueChanged.connect(self.rmEngine.setOrderSizeLimit) self.spinTradeLimit.valueChanged.connect(self.rmEngine.setTradeLimit) + self.spinWorkingOrderLimit.valueChanged.connect(self.rmEngine.setWorkingOrderLimit) self.buttonSwitchEngineStatus.clicked.connect(self.switchEngineSatus) buttonClearOrderFlowCount.clicked.connect(self.rmEngine.clearOrderFlowCount) diff --git a/vn.trader/sgitGateway/vnsgitmd.pyd b/vn.trader/sgitGateway/vnsgitmd.pyd index 404d56a1..7cd9bdf3 100644 Binary files a/vn.trader/sgitGateway/vnsgitmd.pyd and b/vn.trader/sgitGateway/vnsgitmd.pyd differ diff --git a/vn.trader/sgitGateway/vnsgittd.pyd b/vn.trader/sgitGateway/vnsgittd.pyd index 63190637..594ee5f0 100644 Binary files a/vn.trader/sgitGateway/vnsgittd.pyd and b/vn.trader/sgitGateway/vnsgittd.pyd differ