Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 20:20:33 +0000



Post From: EXAMPLE

[2014-02-25 01:29:54]
Sierra Chart Engineering - Posts: 104368
We apologize for the long wait.

We have finally created the examples here:

    {

      // 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);
    }

    {

      // Trailing Stop Attached Order
      // The trailing offset is set by NewOrder.Stop1Offset

      // Create an s_SCNewOrder object.
      s_SCNewOrder NewOrder;
      NewOrder.OrderQuantity = 2;
      NewOrder.OrderType = SCT_ORDERTYPE_MARKET;
      NewOrder.AttachedOrderStop1Type = SCT_ORDERTYPE_TRAILING_STOP;
      NewOrder.Stop1Offset = 10 * sc.TickSize;
      sc.BuyOrder(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