From fcb039eee68c389f64508614303421062176bfa7 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sun, 5 Aug 2018 00:45:18 +0800 Subject: [PATCH] [Mod]Close #1008 --- vnpy/trader/app/spreadTrading/stEngine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/app/spreadTrading/stEngine.py b/vnpy/trader/app/spreadTrading/stEngine.py index 1473b06e..051168c3 100644 --- a/vnpy/trader/app/spreadTrading/stEngine.py +++ b/vnpy/trader/app/spreadTrading/stEngine.py @@ -3,6 +3,7 @@ import json import traceback import shelve +from collections import OrderedDict from vnpy.event import Event from vnpy.trader.vtFunction import getJsonPath, getTempPath @@ -289,8 +290,8 @@ class StAlgoEngine(object): self.mainEngine = mainEngine self.eventEngine = eventEngine - self.algoDict = {} # spreadName:algo - self.vtSymbolAlgoDict = {} # vtSymbol:algo + self.algoDict = OrderedDict() # spreadName:algo + self.vtSymbolAlgoDict = {} # vtSymbol:algo self.registerEvent()