difference between open position and pending order

 

Hello,


I try to make a difference between open position and pending order with mql4.

Example : sell limit is similar to sell (OP_SELLLIMIT - OP_SELL).

Is there a way to say when a pending order is open??


thank you

 
anzaisensei:


Is there a way to say when a pending order is open??

A pending order is open when it is no longer a pending order . . . when a OP_BUYSTOP or OP_BUYLIMIT is an open position it becomes a OP_ BUY
 
anzaisensei:

Hello,

Is there a way to say when a pending order is open??

thank you

Check the return of OrderType() with pending's ticket and OrderSelect() function. If OrderType() <= 1, your pending is opened.
 
onewithzachy:
Check the return of OrderType() with pending's ticket and OrderSelect() function. If OrderType() <= 1, your pending is opened.

Thank you very much.

It works with OrderType() <= 1 .

 

anzaisensei:

onewithzachy:
Check the return of OrderType() with pending's ticket and OrderSelect() function. If OrderType() <= 1, your pending is opened.

Thank you very much.

It works with OrderType() <= 1 .

Actually, you have to thank RaptorUK.

I actually wrote it like this : "Check the return of OrderProfit() with pending's ticket and OrderSelect() function. If OrderProfit() != 0, your pending is opened.". Then I read RaptorUK's reply and I re-edited my reply :)

Reason: