Login Page - Create Account

Support Board


Date/Time: Mon, 10 Mar 2025 08:08:56 +0000



Post From: Sample code for sc.SetAttachedOrders

[2022-01-19 16:01:19]
User99735 - Posts: 234
TedMar,
The sample code provided creates a buy position as well as the attached OCO exit stop / limit sell orders. My query is to only create the OCO exit stop / limit sell orders without creating the position.

User431178,
sc.SubmitOCOOrder() is useful for creating what is popularly known as breakout orders: SCT_ORDERTYPE_OCO_BUY_STOP_SELL_STOP, SCT_ORDERTYPE_OCO_BUY_STOP_LIMIT_SELL_STOP_LIMIT, SCT_ORDERTYPE_OCO_BUY_LIMIT_SELL_LIMIT, ie both the orders in opposite directions ie Buy Stop / Sell Stop etc.

SC_Support,
Please respond.