修复全路径读取策略。
This commit is contained in:
parent
391022d0ef
commit
9fa691c09a
@ -22,7 +22,7 @@ for root, subdirs, files in os.walk(path):
|
||||
# 只有文件名中包含strategy且非.pyc的文件,才是策略文件
|
||||
if 'strategy' in name and '.pyc' not in name:
|
||||
# 模块名称需要上前缀
|
||||
moduleName = 'ctaStrategy.strategy.' + name.replace('.py', '')
|
||||
moduleName = 'vnpy.trader.app.ctaStrategy.strategy.' + name.replace('.py', '')
|
||||
print 'loading {0}'.format(moduleName)
|
||||
try:
|
||||
# 使用importlib动态载入模块
|
||||
|
Loading…
Reference in New Issue
Block a user