From 72fef7f1ff96caeba2ba60b16048f86f805e0064 Mon Sep 17 00:00:00 2001 From: huguanghui Date: Thu, 11 Oct 2018 20:30:59 +0800 Subject: [PATCH 1/2] fix symbol error --- vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py b/vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py index 220358d2..f1128d45 100644 --- a/vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py +++ b/vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py @@ -7,13 +7,14 @@ 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 from vnpy.trader.app.algoTrading.uiAlgoWidget import AlgoWidget, QtWidgets -STATUS_FINISHED = set([STATUS_ALLTRADED, STATUS_CANCELLED, STATUS_REJECTED]) +STATUS_FINISHED = {STATUS_ALLTRADED, STATUS_CANCELLED, STATUS_REJECTED} ######################################################################## @@ -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) From 100700257bc937000488fbcfaf500d886f106984 Mon Sep 17 00:00:00 2001 From: huguanghui Date: Thu, 11 Oct 2018 20:34:27 +0800 Subject: [PATCH 2/2] fix symbol error --- vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py b/vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py index f1128d45..6af2a99b 100644 --- a/vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py +++ b/vnpy/trader/app/algoTrading/algo/arbitrageAlgo.py @@ -14,7 +14,7 @@ from vnpy.trader.app.algoTrading.algoTemplate import AlgoTemplate from vnpy.trader.app.algoTrading.uiAlgoWidget import AlgoWidget, QtWidgets -STATUS_FINISHED = {STATUS_ALLTRADED, STATUS_CANCELLED, STATUS_REJECTED} +STATUS_FINISHED = set([STATUS_ALLTRADED, STATUS_CANCELLED, STATUS_REJECTED]) ########################################################################