Support Board
Date/Time: Sun, 19 Jan 2025 12:39:11 +0000
Post From: TRAILING STOP TRIGGER
[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. |