Pending Orders, which is reached (open, not closed) and which is still a LimitOrder

 

Hi,
I want to write my own EA.
First I send a SellLimit and a BuyLimit.

Then I want to see, which Orders of them are reached. How can I see which order is still open??

When I look at OrdersTotal() is get my OPEN and PENDING Orders.

Lot's of thanks,

sunshineh

 

S

OrderTotal does indeed include OPEN and PENDING

The difference between them is known by the OrderType - see https://docs.mql4.com/trading/OrderType

Which will change when a PENDING is hit and becomes an OPEN

Good Luck

-BB-

Reason: