the only thing you can do to check if pending order is already active is to check:
IF (OrderPosition(your magic number) Flat
This triggers when the order is active, for pending order it is Flat.
There’s no other way, there is no event in MT4 that would notify you when pending order becomes active.
If you need it to trigger just once then you ‘d have to use some variable that you’ll set to true once this is triggered and to false once you open new pending order.
You must be logged in to reply to this topic.