Support Board
Date/Time: Sat, 27 Apr 2024 08:25:48 +0000
Post From: Send Attached Orders By Position
[2021-01-08 23:22:08] |
User184576 - Posts: 20 |
Hi, I have an open bracket order with a target and a hard stop. At a certain point, I would like to cancel the hard stop and add an attached trailing stop. I can do this manually in the chart by enabling "Send Attached Orders By Position". However, I am having trouble implementing this via ACSIL in a custom study. I've tried modifying the parent order as per below, however it does not seem to be working. Is this even a possible using ACSIL? If so, any assistance would be appreciated. Thank you. Sample: //Cancel Hard Stop int Result = sc.CancelOrder(StopOrderID); //Initiate New Trailing Stop Order To Open Parent Order s_SCNewOrder OpenParentOrder; OpenParentOrder.InternalOrderID = OpenParentOrderID; OpenParentOrder.AttachedOrderStopAllType = SCT_ORDERTYPE_TRAILING_STOP; float stopOffset = 50.0; OpenParentOrder.StopAllOffset = stopOffset; int Result2 = (int)sc.SellEntry(OpenParentOrder);; Date Time Of Last Edit: 2021-01-08 23:33:54
|