diff --git a/vnpy/app/cta_strategy/converter.py b/vnpy/app/cta_strategy/converter.py index e12439c8..e8d5423b 100644 --- a/vnpy/app/cta_strategy/converter.py +++ b/vnpy/app/cta_strategy/converter.py @@ -82,10 +82,12 @@ class OffsetConverter: contract = self.main_engine.get_contract(vt_symbol) # Only contracts with long-short position mode requires convert - if not contract or not contract.net_position: - return True - else: + if not contract: return False + elif contract.net_position: + return False + else: + return True class PositionHolding: