From c88ce86d23dadac9ccd591559f1164b2f60c0fa6 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Sun, 31 Jul 2016 09:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A3=8E=E6=8E=A7=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=8C=81=E4=BB=93=E6=AF=94?= =?UTF-8?q?=E4=BE=8B=E6=8E=A7=E5=88=B6=E3=80=82=E5=A6=82=E8=B6=85=E8=BF=87?= =?UTF-8?q?90%=E5=B0=B1=E4=B8=8D=E5=BC=80=E4=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/riskManager/rmEngine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vn.trader/riskManager/rmEngine.py b/vn.trader/riskManager/rmEngine.py index 55e2543e..3c5944a6 100644 --- a/vn.trader/riskManager/rmEngine.py +++ b/vn.trader/riskManager/rmEngine.py @@ -139,7 +139,7 @@ class RmEngine(object): if balance == EMPTY_FLOAT: self.percent = EMPTY_FLOAT else: - self.pecent = round((balance - available)*100/balance,2) + self.percent = round((balance - available)*100/balance,2) #---------------------------------------------------------------------- def writeRiskLog(self, content): @@ -190,6 +190,7 @@ class RmEngine(object): %(workingOrderCount, self.workingOrderLimit)) return False + self.writeRiskLog(u'DEBUG:Offset:{0},percent:{1},Limit:{2}'.format(orderReq.offset, self.percent, self.percentLimit)) # 检查仓位 add by Incense 20160728 if orderReq.offset == OFFSET_OPEN: