This commit is contained in:
msincenselee 2015-10-24 07:25:53 +08:00
parent 3a77d39b9b
commit ab4ef8ff1f
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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):
"""撤销停止单"""