How to make so that the following code after the change order?

Created at 23 Sep 2013, 07:07
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
EM

emelenium

Joined 23.09.2013

How to make so that the following code after the change order?
23 Sep 2013, 07:07


Trade.ModifyPosition(openedPosition, newStopLoss, newTakeProfit);

How to make sure that the code following the Trade.Modifyposition not executed until Trade.ModifyPosition completed its work?How to make sure that the code following the Trade.ModifyPosition carried out after changing the order?

??? ??????? ??? ????? ??? ????????? ????? Trade.?????????????? ?? ?????????? ???? Trade.ModifyPosition ?? ???????? ???? ??????? 


@emelenium
Replies

fzlogic
23 Sep 2013, 09:36

Use an if statement to check if the SL/TP values of the position in reference are the new or the old.


@fzlogic

emelenium
23 Sep 2013, 18:25

RE:

You can give an example?

Use an if statement to check if the SL/TP values of the position in reference are the new or the old.

 


@emelenium

emelenium
23 Sep 2013, 18:29

No no no, it was necessary to wait for finishing the Trade.ModifyPosition.Does anyone tell me?


@emelenium

Kate
23 Sep 2013, 18:35

Try Trade.IsExecuting


@Kate

emelenium
24 Sep 2013, 08:46

RE:

How does it work?

Kate said:

Try Trade.IsExecuting

 


@emelenium