Merge pull request #1161 from raycool/raycool-dev

套利交易逻辑对冲函数逻辑被动腿错误
This commit is contained in:
vn.py 2018-10-12 09:08:39 +08:00 committed by GitHub
commit 051f00f051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ from vnpy.trader.vtConstant import (DIRECTION_LONG, DIRECTION_SHORT,
OFFSET_OPEN, OFFSET_CLOSE,
STATUS_ALLTRADED, STATUS_CANCELLED,
STATUS_REJECTED)
from vnpy.trader.uiQt import QtGui
from vnpy.trader.app.algoTrading.algoTemplate import AlgoTemplate
@ -157,7 +158,7 @@ class ArbitrageAlgo(AlgoTemplate):
tick.bidPrice5,
volume)
elif self.netPos < 0:
self.passiveOrderID = self.buy(self.activeVtSymbol,
self.passiveOrderID = self.buy(self.passiveVtSymbol,
tick.askPrice5,
volume)