Support Board
Date/Time: Tue, 18 Mar 2025 09:33:50 +0000
Post From: Stop all issue
[2022-09-18 23:42:52] |
User785723 - Posts: 58 |
I am using the following code to send two targets (each for the order quantity of one) and one stop order for all. The issue is that when target1 is filled, the stop order is canceled but this should not happen as there is still an open position with the quantity of one. Am I doing something wrong? Variables in "Set Dafaults" are attached for your reference. // TP1
NewOrder.Target1Price = 100; NewOrder.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT; NewOrder.OCOGroup1Quantity = 1; // TP2 NewOrder.Target2Price = 120; NewOrder.AttachedOrderTarget2Type = SCT_ORDERTYPE_LIMIT; NewOrder.OCOGroup2Quantity = 1; // SL NewOrder.StopAllPrice = sl; NewOrder.AttachedOrderStopAllType = SCT_ORDERTYPE_STOP; |
Private File |