[bug fix] 组合回测时,各策略实例分别输出成交csv文件

This commit is contained in:
msincenselee 2020-04-08 22:25:29 +08:00
parent 8c8c5d3790
commit 16f9c6641b
2 changed files with 2 additions and 2 deletions

View File

@ -2155,7 +2155,7 @@ class BackTestingEngine(object):
:param trade: :param trade:
:return: :return:
""" """
strategy_name = getattr(trade, 'strategy', self.test_name) strategy_name = getattr(trade, 'strategy_name', self.test_name)
trade_fields = ['symbol', 'exchange', 'vt_symbol', 'tradeid', trade_fields = ['symbol', 'exchange', 'vt_symbol', 'tradeid',
'vt_tradeid', 'orderid', 'vt_orderid', 'vt_tradeid', 'orderid', 'vt_orderid',
'direction', 'direction',

View File

@ -2259,7 +2259,7 @@ class BackTestingEngine(object):
:param trade: :param trade:
:return: :return:
""" """
strategy_name = getattr(trade, 'strategy', self.test_name) strategy_name = getattr(trade, 'strategy_name', self.test_name)
trade_fields = ['symbol', 'exchange', 'vt_symbol', 'tradeid', trade_fields = ['symbol', 'exchange', 'vt_symbol', 'tradeid',
'vt_tradeid', 'orderid', 'vt_orderid', 'vt_tradeid', 'orderid', 'vt_orderid',
'direction', 'direction',