From 6e5cec2d1cb9406d92e1e45a86a74b1f7979b797 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Sun, 29 Mar 2020 13:53:28 +0800 Subject: [PATCH] [bug fix] --- vnpy/app/cta_crypto/back_testing.py | 5 ----- vnpy/app/cta_crypto/engine.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/vnpy/app/cta_crypto/back_testing.py b/vnpy/app/cta_crypto/back_testing.py index c6757a5f..c136419c 100644 --- a/vnpy/app/cta_crypto/back_testing.py +++ b/vnpy/app/cta_crypto/back_testing.py @@ -713,11 +713,6 @@ class BackTestingEngine(object): vt_symbol = strategy_setting.get('vt_symbol') if '.' in vt_symbol: symbol, exchange = extract_vt_symbol(vt_symbol) - elif self.contract_type == 'future': - symbol = vt_symbol - underly_symbol = get_underlying_symbol(symbol).upper() - exchange = self.get_exchange(f'{underly_symbol}99') - vt_symbol = '.'.join([symbol, exchange.value]) else: symbol = vt_symbol exchange = Exchange.LOCAL diff --git a/vnpy/app/cta_crypto/engine.py b/vnpy/app/cta_crypto/engine.py index 0525faf6..e0aebb0f 100644 --- a/vnpy/app/cta_crypto/engine.py +++ b/vnpy/app/cta_crypto/engine.py @@ -1547,7 +1547,7 @@ class CtaEngine(BaseEngine): 'account_id': self.engine_config.get('account_id', '-'), 'vt_symbol': vt_symbol, 'direction': Direction.SHORT.value, - 'strategy_list': symbol_pos.get('多单策略', [])} + 'strategy_list': symbol_pos.get('空单策略', [])} # 多空都一致 if round(symbol_pos['账号空单'], 7) == round(symbol_pos['策略空单'], 7) and \