Login Page - Create Account

Support Board


Date/Time: Sun, 23 Feb 2025 22:02:00 +0000



Post From: replacing stop order with trailing order

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