diff --git a/vnpy/app/cta_crypto/back_testing.py b/vnpy/app/cta_crypto/back_testing.py index 8ecdf7bf..ab2f03a1 100644 --- a/vnpy/app/cta_crypto/back_testing.py +++ b/vnpy/app/cta_crypto/back_testing.py @@ -2155,7 +2155,7 @@ class BackTestingEngine(object): :param trade: :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', 'vt_tradeid', 'orderid', 'vt_orderid', 'direction', diff --git a/vnpy/app/cta_strategy_pro/back_testing.py b/vnpy/app/cta_strategy_pro/back_testing.py index 22d66cfd..f010e482 100644 --- a/vnpy/app/cta_strategy_pro/back_testing.py +++ b/vnpy/app/cta_strategy_pro/back_testing.py @@ -2259,7 +2259,7 @@ class BackTestingEngine(object): :param trade: :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', 'vt_tradeid', 'orderid', 'vt_orderid', 'direction',