Support Board
Date/Time: Mon, 27 Oct 2025 14:39:12 +0000
Post From: C++ ACSIL OCO stop/limit order clean implementation
| [2022-05-12 19:41:53] |
| ForgivingComputers.com - Posts: 1150 |
|
You can get the order qty from the trade window, then set the OrderType, Entry Price (Last in this example), Stop as an Offset, and Target as an offset: s_SCNewOrder NewOrder; NewOrder.OrderQuantity = sc.TradeWindowOrderQuantity; NewOrder.OrderType = SCT_ORDERTYPE_LIMIT; NewOrder.Price1 = sc.Last[sc.Index]; // this is the Entry Price NewOrder.Target1Offset = TargetTicks.GetInt() * sc.TickSize; NewOrder.Stop1Offset = StopTicks.GetInt() * sc.TickSize; |
