From 16f9c6641b3cbea59b592d908b31f7af5743b3e2 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Wed, 8 Apr 2020 22:25:29 +0800 Subject: [PATCH] =?UTF-8?q?[bug=20fix]=20=E7=BB=84=E5=90=88=E5=9B=9E?= =?UTF-8?q?=E6=B5=8B=E6=97=B6=EF=BC=8C=E5=90=84=E7=AD=96=E7=95=A5=E5=AE=9E?= =?UTF-8?q?=E4=BE=8B=E5=88=86=E5=88=AB=E8=BE=93=E5=87=BA=E6=88=90=E4=BA=A4?= =?UTF-8?q?csv=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/app/cta_crypto/back_testing.py | 2 +- vnpy/app/cta_strategy_pro/back_testing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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',