m_pClient->placeOrder(m_orderId, m_contract, order_parent); m_pClient->placeOrder(m_orderId + 1, m_contract, order_stoploss); m_pClient->placeOrder(m_orderId + 2, m_contract, order_profittaking); trying to make a MKT parent order, and two child orders, one sl with STP type, one tp with LMT type. problem is, I have to submit three orders in turn. parent order first. but after I submitt the parent order, it will be filled immediately. child orders will produces error msg like: Error id=59, errorCode=201, msg=Order rejected - reason:The parent order is bein g canceled. And another question, In TWS, I am able to submit stop with stop price of actually traded price of parent order, How should I do it via API? the trade price of parent order is unknown when submitting attached child stop loss order. right now, I am submitting two child orders with very wild sl and tp level and modified it once parent order gets filled. apparently this is not a good solution Any idea? thank you.