Login Page - Create Account

Support Board


Date/Time: Fri, 27 Dec 2024 02:22:09 +0000



Post From: Order seems to be transmitted erroneously to Trade Service

[2016-02-18 15:20:38]
User295672 - Posts: 1
I'm compiling a very simple order in a study for Automated Trading. The base order is a Limit order, the attached orders are Target as Market If Touched and the Stop is another Limit order. While it seems, according to the trade log, that the Order is compiled correctly (Order Type is shown as Limit) it is still filled as a simple Market Order.

Is the problem in my order preparation or somewhere else?


s_SCNewOrder order;
order.OrderType = SCT_ORDERTYPE_LIMIT;
order.Price1 = entry;

order.Target1Offset = targetOffset;
order.Stop1Offset = stopOffset;
  
order.AttachedOrderTarget1Type = SCT_ORDERTYPE_MARKET_IF_TOUCHED;
order.AttachedOrderStop1Type = SCT_ORDERTYPE_LIMIT;
  
order.OCOGroup1Quantity = 1;
order.OrderQuantity = amount;