Support Board
Date/Time: Sat, 01 Mar 2025 16:04:06 +0000
Post From: SetAttachedOrders(const s_SCNewOrder& AttachedOrdersConfiguration)
[2021-10-06 14:12:24] |
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; |