From ce1a85b656018ac5b79440153624a20e413c9c40 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Mon, 12 Oct 2020 12:40:51 +0800 Subject: [PATCH] =?UTF-8?q?[bug=20fix]=20=E4=BF=AE=E5=A4=8D=E8=82=A1?= =?UTF-8?q?=E6=8C=87=E5=AF=B9=E9=94=81=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/app/cta_strategy_pro/template_spread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/app/cta_strategy_pro/template_spread.py b/vnpy/app/cta_strategy_pro/template_spread.py index aa8f9f80..7f2720e1 100644 --- a/vnpy/app/cta_strategy_pro/template_spread.py +++ b/vnpy/app/cta_strategy_pro/template_spread.py @@ -1,4 +1,4 @@ -# 套利模板 +# 套利模板 # 华富资产 @ 李来佳 import os @@ -419,7 +419,7 @@ class CtaSpreadTemplate(CtaTemplate): if order_info is not None: # 委托单记录 =》 找到 Grid grid = order_info.get('grid') - if grid: + if grid and order_info.get('offset', None) == Offset.OPEN: # 更新平均开仓/平仓得价格,数量 self.update_grid_trade(trade, grid)