[bug fix]
This commit is contained in:
parent
5ff49f70b2
commit
6e5cec2d1c
@ -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
|
||||
|
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user