Login Page - Create Account

Support Board


Date/Time: Wed, 22 May 2024 01:29:09 +0000



Post From: Implementing simple trailing stop and profit target in ACSIL

[2017-01-12 21:22:11]
Sierra Chart Engineering - Posts: 104368
Here is an example:

  s_SCNewOrder NewOrder;
  NewOrder.OrderQuantity = 1;
  NewOrder.OrderType = SCT_ORDERTYPE_MARKET;
  NewOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;

  //Specify a Target and a Stop with 8 tick offsets. We are specifying one Target and one Stop, additional targets and stops can be specified as well.
  NewOrder.Target1Offset = 8*sc.TickSize;
  NewOrder.Stop1Offset = 8*sc.TickSize;
NewOrder.AttachedOrderStop1Type = SCT_ORDERTYPE_TRAILING_STOP;
  NewOrder.OCOGroup1Quantity = 1; // If this is left at the default of 0, then it will be automatically set.

You do need to use Attached Orders to put a Target and Stop. There is no other way.
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: 2017-01-12 21:58:58