修改回测模型,增加backtesting内置属性
This commit is contained in:
parent
ccf3bb1b8a
commit
452efb4da7
@ -34,6 +34,7 @@ class CtaTemplate(object):
|
||||
inited = False # 是否进行了初始化
|
||||
trading = False # 是否启动交易,由引擎管理
|
||||
pos = 0 # 持仓情况
|
||||
backtesting = False # 是否回测
|
||||
|
||||
# 参数列表,保存了参数的名称
|
||||
paramList = ['name',
|
||||
@ -41,7 +42,8 @@ class CtaTemplate(object):
|
||||
'author',
|
||||
'vtSymbol',
|
||||
'symbol',
|
||||
'shortSymbol']
|
||||
'shortSymbol',
|
||||
'backtesting']
|
||||
|
||||
# 变量列表,保存了变量的名称
|
||||
varList = ['inited',
|
||||
|
Loading…
Reference in New Issue
Block a user