Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 00:46:10 +0000



MARKET IF TOUCHED OCO

View Count: 1004

[2017-12-18 12:47:41]
User28317 - Posts: 147
I have a study that places automated OCO Trades. Target Order should be set to Limit, Stop to Market If Touched. The orders are placed mostly correctly with the exception of the Stop order, which is placed as Limit. I tried to force the Market If touched type, and explicitely set all Stop Order Groups to Merket If touched, but it doesn't change anything.

The relevant code is:

  // Setting price for entry, target and stop
  // ...
  order.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT;
  order.AttachedOrderStop1Type = SCT_ORDERTYPE_MARKET_IF_TOUCHED;
  order.AttachedOrderTarget2Type = SCT_ORDERTYPE_LIMIT;
  order.AttachedOrderStop2Type = SCT_ORDERTYPE_MARKET_IF_TOUCHED;
  order.AttachedOrderTarget3Type = SCT_ORDERTYPE_LIMIT;
  order.AttachedOrderStop3Type = SCT_ORDERTYPE_MARKET_IF_TOUCHED;
  order.AttachedOrderTarget4Type = SCT_ORDERTYPE_LIMIT;
  order.AttachedOrderStop4Type = SCT_ORDERTYPE_MARKET_IF_TOUCHED;

  order.AttachedOrderStopAllType = SCT_ORDERTYPE_MARKET_IF_TOUCHED;

  order.OCOGroup1Quantity = 1;
  order.OrderQuantity = t.amount_;
  
  if (sc.BuyEntry(order) < 0)
      sc.AddMessageToLog("Failed to submit order to the trading service.", 0);

What exactly am I doing wrong?
[2017-12-18 18:15:36]
Sierra Chart Engineering - Posts: 104368
You cannot use a market if touched order as a stop. You must use a Stop type.
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
[2019-02-22 18:28:30]
ARDAN - Posts: 66
I trade on LMAX and my server side bracket orders and OCO orders enabled so I keep my orders at the intermediary Sierra Server.
My target orders in attached orders are limit and MIT order types.
As far as I know, Sierra submits limit target orders immediately to LMAX.
I would like to learn If Sierra keeps my MIT attached orders (not MIT-client) at the intermediary server or submits it LMAX immediately.
Thanks.
[2019-02-22 20:47:42]
Sierra Chart Engineering - Posts: 104368
They are submitted immediately to LMAX.
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

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account