Skip to content

Commit

Permalink
[bug fix] 修复股指对锁的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
msincenselee committed Oct 13, 2020
1 parent e230b27 commit ce1a85b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vnpy/app/cta_strategy_pro/template_spread.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 套利模板
# 套利模板
# 华富资产 @ 李来佳

import os
Expand Down Expand Up @@ -419,7 +419,7 @@ def on_trade(self, trade: TradeData):
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)

Expand Down

0 comments on commit ce1a85b

Please sign in to comment.