Login Page - Create Account

Support Board


Date/Time: Sat, 01 Mar 2025 14:12:21 +0000



[Programming Help] - ACSIL - AttachedOrders

View Count: 652

[2021-10-04 14:46:47]
User783475 - Posts: 12
Can anyone show me an example of a correct use of sc.SetAttachedOrders() function?
1) I need to use 2 attached orders. The sc.SetAttachedOrders() function take one parameter s_SCNewOrder that should contain the configuration for the Attached Orders, but how can I use it to configure 2 attached orders?
2) I made some tries, but I didn't reach to set the price that i wanted for the attached orders, so I would be really thanksful if someone could show me an example... I tried something like this:

s_SCNewOrder Attached;
Attached.OrderType = SCT_ORDERTYPE_LIMIT;
Attached.Price1 = my_fun();
sc.SetAttachedOrders(Attached);
.
.
.
s_SCNewOrder NewOrder;
NewOrder.OrderQuantity = Quantity;
NewOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;
NewOrder.Price1 = sc.Low[sc.Index] - sc.TickSize;

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account