From c9fcaadab38d402b281eb91342fca3ef53d7ea28 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Fri, 30 Sep 2016 08:19:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcover=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/ctaAlgo/ctaTemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vn.trader/ctaAlgo/ctaTemplate.py b/vn.trader/ctaAlgo/ctaTemplate.py index 78d08e6c..0db90cc3 100644 --- a/vn.trader/ctaAlgo/ctaTemplate.py +++ b/vn.trader/ctaAlgo/ctaTemplate.py @@ -22,7 +22,7 @@ class CtaTemplate(object): barDbName = MINUTE_DB_NAME # 策略的基本参数 - name = EMPTY_UNICODE # 策略实例名称 + name = 'StrategyName' # 策略实例名称 vtSymbol = EMPTY_STRING # 交易的合约vt系统代码 symbol = EMPTY_STRING # 交易的合约代码(除郑商所外与vtSymbol一致,一般为两位代码+两位年份+两位月份)AU1606,SR1605 shortSymbol = EMPTY_STRING # 合约类型代码 @@ -163,7 +163,7 @@ class CtaTemplate(object): orderID = self.sendOrder(CTAORDER_COVER, price, volume, stop) if orderID !='': - self.entrust = -1 # 置当前策略的委托单状态 + self.entrust = 1 # 置当前策略的委托单状态 # 记录委托单 self.uncompletedOrders[orderID] = {'DIRECTION': DIRECTION_LONG, 'OFFSET': OFFSET_CLOSE,