Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Bian Jiang 2016-05-04 22:04:56 +08:00
commit d7750675b8
5 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{
"orderFlowClear": 1,
"workingOrderLimit": 0,
"tradeLimit": 200,
"workingOrderLimit": 20,
"tradeLimit": 100,
"orderSizeLimit": 10,
"active": true,
"orderFlowLimit": 10

View File

@ -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))

View File

@ -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)

Binary file not shown.

Binary file not shown.