[bug fix]

This commit is contained in:
msincenselee 2020-03-29 13:53:28 +08:00
parent 5ff49f70b2
commit 6e5cec2d1c
2 changed files with 1 additions and 6 deletions

View File

@ -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

View File

@ -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 \