diff --git a/vn.strategy/strategydemo/backtestingEngine.py b/vn.strategy/strategydemo/backtestingEngine.py index a30f51f2..d30f0aa2 100644 --- a/vn.strategy/strategydemo/backtestingEngine.py +++ b/vn.strategy/strategydemo/backtestingEngine.py @@ -151,10 +151,10 @@ class BacktestingEngine(object): def __loadDataHistoryFromLocalCache(self, symbol, startDate, endDate): """看本地缓存是否存在""" - cacheFolder = os.getcwd()+'\\cache' + cacheFolder = os.getcwd()+'\/cache' - cacheFile = u'{0}\\{1}_{2}_{3}.pickle'.format(cacheFolder,symbol, startDate.strftime('%Y-%m-%d'), endDate.strftime('%Y-%m-%d')) + cacheFile = u'{0}\/{1}_{2}_{3}.pickle'.format(cacheFolder,symbol, startDate.strftime('%Y-%m-%d'), endDate.strftime('%Y-%m-%d')) if not os.path.isfile(cacheFile): return False @@ -166,12 +166,12 @@ class BacktestingEngine(object): def __saveDataHistoryToLocalCache(self, symbol, startDate, endDate): """保存本地缓存""" - cacheFolder = os.getcwd()+'\\cache' + cacheFolder = os.getcwd()+'\/cache' if not os.path.isdir(cacheFolder): os.mkdir(cacheFolder) - cacheFile = u'{0}\\{1}_{2}_{3}.pickle'.format(cacheFolder,symbol, startDate.strftime('%Y-%m-%d'), endDate.strftime('%Y-%m-%d')) + cacheFile = u'{0}\/{1}_{2}_{3}.pickle'.format(cacheFolder,symbol, startDate.strftime('%Y-%m-%d'), endDate.strftime('%Y-%m-%d')) if os.path.isfile(cacheFile): return False diff --git a/vn.strategy/strategydemo/strategyEngine.py b/vn.strategy/strategydemo/strategyEngine.py index cb3eaa9c..de98a0da 100644 --- a/vn.strategy/strategydemo/strategyEngine.py +++ b/vn.strategy/strategydemo/strategyEngine.py @@ -443,7 +443,7 @@ class StrategyEngine(object): """ # 保存本地pickle文件 - resultPath=os.getcwd()+'\\result' + resultPath=os.getcwd()+'\/result' if not os.path.isdir(resultPath): os.mkdir(resultPath) @@ -517,7 +517,7 @@ class StrategyEngine(object): """ # 保存本地pickle文件 - resultPath=os.getcwd()+'\\result' + resultPath=os.getcwd()+'\/result' if not os.path.isdir(resultPath): os.mkdir(resultPath) @@ -1084,7 +1084,7 @@ class StrategyTemplate(object): def cancelOrder(self, orderRef): """撤单""" self.engine.cancelOrder(orderRef) - + #---------------------------------------------------------------------- def cancelStopOrder(self, so): """撤销停止单"""