Login Page - Create Account

Support Board


Date/Time: Mon, 10 Mar 2025 02:02:41 +0000



Post From: Attached Stop

[2022-03-11 20:53:06]
User39772 - Posts: 311
Hello,

I implemented an attached stop with the following code:

NewOrder.Stop1Offset = Input_InitialStop.GetFloat() * sc.TickSize;
NewOrder.AttachedOrderStop1Type = SCT_ORDERTYPE_STOP;

The exit in profit is based on :

LastTradePrice >= PositionData.AveragePrice + Input_TargetValue.GetFloat()

i.e. no attached target order.

I see the following behavior:

With an attached Target order it works as expected.
With the code above, the Trade Activity Log does only show positions that where closed by the attached stop.

Is it necessary to cancel a pending attached stop order, if the position is closed in profit manually
or what could be the cause for that behavior ?