diff --git a/vn.trader/noUiMain.py b/vn.trader/noUiMain.py index 85ceb0fa..236c95ee 100644 --- a/vn.trader/noUiMain.py +++ b/vn.trader/noUiMain.py @@ -66,12 +66,13 @@ class NoUiMain(object): # 十秒才执行一次检查 self.g_count += 1 - if self.g_count <= 20: + if self.g_count <= 30: return self.g_count = 0 dt = datetime.now() if dt.hour != self.last_dt.hour: self.last_dt = dt + print u'noUiMain.py checkpoint:{0}'.format(dt) self.mainEngine.writeLog( u'noUiMain.py checkpoint:{0}'.format(dt)) # 定时断开 @@ -99,12 +100,13 @@ class NoUiMain(object): self.mainEngine.writeLog(u'检查连接{0}异常,重新启动连接'.format(self.gateway_name)) self.mainEngine.writeLog(u'断开连接{0}'.format(self.gateway_name)) self.disconnect() - self.mainEngine.writeLog(u'清空数据引擎') - self.mainEngine.clearData() - self.mainEngine.writeLog(u'重新连接{0}'.format(self.gateway_name)) - self.mainEngine.connect(self.gateway_name) - self.connected = True - + self.connected = False + #self.mainEngine.writeLog(u'清空数据引擎') + #self.mainEngine.clearData() + #self.mainEngine.writeLog(u'重新连接{0}'.format(self.gateway_name)) + #self.mainEngine.connect(self.gateway_name) + #self.connected = True +# def Start(self): """启动""" diff --git a/vn.trader/riskManager/RM_setting.json b/vn.trader/riskManager/RM_setting.json index c9d7360d..29bc7030 100644 --- a/vn.trader/riskManager/RM_setting.json +++ b/vn.trader/riskManager/RM_setting.json @@ -1,10 +1,10 @@ { "orderFlowClear": 10, - "percentLimit": 80, + "percentLimit": 100, "workingOrderLimit": 200, "tradeLimit": 20000, "orderSizeLimit": 100, + "lossLimit": 10000, "active": true, - "lossPercentLimit": 11, "orderFlowLimit": 20000 } \ No newline at end of file diff --git a/vn.trader/vtEngine.py b/vn.trader/vtEngine.py index a28281fc..023fbf63 100644 --- a/vn.trader/vtEngine.py +++ b/vn.trader/vtEngine.py @@ -91,7 +91,6 @@ class MainEngine(object): if gatewayName in self.gatewayDict: gateway = self.gatewayDict[gatewayName] return gateway.checkStatus() - else: self.writeLog(text.GATEWAY_NOT_EXIST.format(gateway=gatewayName)) return False