Support Board
Date/Time: Sun, 19 Jan 2025 12:38:08 +0000
[Programming Help] - TRAILING STOP TRIGGER
View Count: 1411
[2018-03-29 22:16:14] |
User28317 - Posts: 149 |
We compile our order with the following code: order.Target2Price = t.target_; order.Stop2Price = t.stop_; order.OCOGroup2Quantity = t.amount_ / 2; order.AttachedOrderTarget2Type = SCT_ORDERTYPE_LIMIT; order.AttachedOrderStop2Type = SCT_ORDERTYPE_STOP; order.Target1Price = t.entry_ + t.risk_; order.Stop1Price = t.stop_; order.OCOGroup1Quantity = t.amount_ - (t.amount_ / 2); order.TriggeredTrailStopTrailPriceOffset = t.trailingDistance_; order.TriggeredTrailStopTriggerPriceOffset = t.target_ - t.stop_; order.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT; order.AttachedOrderStop1Type = SCT_ORDERTYPE_STEP_TRAILING_STOP; Which should trigger the trailing on reaching the value t.target_ It seems that this doesn't happen sometimes, with the trailing not starting even when the trigger value is reached. |
[2018-03-30 22:36:16] |
Sierra Chart Engineering - Posts: 104368 |
The problem is the attached order stop type (AttachedOrderStop1Type) is not one of the triggered types. Refer to: https://www.sierrachart.com/index.php?page=doc/ACSILTrading.html#s_SCNewOrder_TriggeredTrailStopTriggerPriceOffset Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2018-03-31 01:42:57
|
To post a message in this thread, you need to log in with your Sierra Chart account: