Support Board
Date/Time: Mon, 25 Nov 2024 20:52:21 +0000
Post From: HOW TO PROGRAM A TRAILING STOP ORDER USING ACSIL
[2014-02-25 01:19:05] |
Sierra Chart Engineering - Posts: 104368 |
Here is the example: {
// Trailing stop order. This has no Attached Orders. // The trailing offset is the difference between the current market price for the Symbol of the chart the trading study is applied to // and the price set by NewOrder.Price1 // Create an s_SCNewOrder object. s_SCNewOrder NewOrder; NewOrder.OrderQuantity = 2; NewOrder.OrderType = SCT_ORDERTYPE_TRAILING_STOP; NewOrder.Price1 = sc.BaseData[SC_LAST][sc.Index] - 10*sc.TickSize; sc.SellOrder(NewOrder); } 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 |