Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 16:40:16 +0000



Post From: SCT_ORDERTYPE_OCO_BUY_STOP_SELL_STOP question

[2014-04-10 23:22:38]
Sierra Chart Engineering - Posts: 104368
Here you go:
  s_SCNewOrder NewOrder;
  NewOrder.OrderQuantity = 4;
  NewOrder.OrderType = SCT_ORDERTYPE_OCO_BUY_STOP_SELL_STOP;

  NewOrder.Price1 = Last + 10 * sc.TickSize;
  NewOrder.Price2 = Last - 10 * sc.TickSize;

  // Optional: Add target and stop Attached Orders to each stop in the OCO pair.
  NewOrder.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT;
  NewOrder.Target1Offset = 4 * sc.TickSize;
  NewOrder.AttachedOrderStop1Type = SCT_ORDERTYPE_STOP;
  NewOrder.Stop1Offset = 4 * sc.TickSize;

  if ( sc.SubmitOCOOrder(NewOrder) >0)
  {

    int BuyStopOrder1ID = NewOrder.InternalOrderID;
    int SellStopOrder2ID = NewOrder.InternalOrderID2;

  }

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