From b755f9f1fa240c37857f66cca3151dcb722ca2a6 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sat, 27 Jul 2019 08:47:12 +0800 Subject: [PATCH] [Mod] close #1969 --- vnpy/app/cta_strategy/engine.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vnpy/app/cta_strategy/engine.py b/vnpy/app/cta_strategy/engine.py index bcaf2e6a..abf1c565 100644 --- a/vnpy/app/cta_strategy/engine.py +++ b/vnpy/app/cta_strategy/engine.py @@ -323,6 +323,11 @@ class CtaEngine(BaseEngine): for req in req_list: vt_orderid = self.main_engine.send_order( req, contract.gateway_name) + + # Check if sending order successful + if not vt_orderid: + continue + vt_orderids.append(vt_orderid) self.offset_converter.update_order_request(req, vt_orderid)