Login Page - Create Account

Support Board


Date/Time: Thu, 03 Jul 2025 11:15:44 +0000



Post From: replacing stop order with trailing order

[2021-02-20 17:02:29]
User61576 - Posts: 450
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