Login Page - Create Account

Support Board


Date/Time: Thu, 18 Sep 2025 11:51:37 +0000



Post From: replacing stop order with trailing order

[2021-02-20 17:02:29]
User61576 - Posts: 453
s_SCNewOrder TrailOrder;
TrailOrder.OrderQuantity = totalBuyOrderSubmitted - totalExits;
TrailOrder.OrderType = SCT_ORDERTYPE_TRAILING_STOP;
TrailOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;
TrailOrder.Price1 = target1Price - 10 * sc.TickSize;
sc.SellOrder(TrailOrder);

the above works.

I was missing the OrderType