Topics

Forum Topics not found

Replies

khezrian
22 Jul 2022, 14:22 ( Updated at: 21 Dec 2023, 09:22 )

you need to have an available account linked to your cTrader ID to copy this strategy

Hello ,

I also faced this exact problem.

Please advise what should be done to fix this error.

Thanks


@khezrian

khezrian
24 Feb 2022, 14:11

Automatic cancellation of Pending Orders Limit and Stop

Hi,

Based on the issues raised in this post, and since T/P and S/L cannot be determined directly through the FIX API, it should be done as Limit and Stop by creating a new order contrary to the original position.

These Limit and Stop orders are placed in the order list as Pending Order.


PositionID value (or tag 721) is sent when registering Limit and Stop orders.


We have two problems:

1- If the main position is closed by any of the Limit or Stop orders, the other order will remain in the Pending Order list.
Question: How can this be done automatically? , Ie if the main position is closed by Pending Order Limit, Pending Order Stop is automatically deleted (deleted or closed) and vice versa, if the main position is closed by Pending Order Stop, Pending Order Limit is automatically deleted (deleted) Or be closed).

2- If the main position is closed manually through any platform (for example, cTrader), the two orders created Limit and Stop will remain in the order list.


Since we send tag 721, which is PositionID, when creating Limit and Stop orders, we expect these Pending Orders to be removed as the main position closes.


I know that I can report the status of the position using (MsgType(35)=AP) and I also know that I can cancel an order using (MsgType(35)=F).

I'm looking for a solution, after applying one of the Pending Order Limit or Stop, Another Pending Order is automatically canceled.

Please advise what should be done in this regard.


@khezrian