Reply

When pending order becomes active…

2 replies

Adedayojoy

Subscriber, bbp_participant, community, 5 replies.

Visit profile

9 years ago #112324

Hello everyone!

I am writing an EA that involves taking a particular action ONLY WHEN A PARTICULAR PENDING ORDER BECOMES ACTIVE. So far I haven’t been able to find a way to write that condition in EA Wizard. A help will be appreciated.

Thanks.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

9 years ago #125211

Hello,

 

the only thing you can do to check if pending order is already active is to check:

 

IF (OrderPosition(your magic number) Flat

THEN…

 

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.

Mark
StrategyQuant architect

0

Adedayojoy

Subscriber, bbp_participant, community, 5 replies.

Visit profile

9 years ago #125217

Owh! Thanks Mark. This should work.

 

Thanks again.

0

Viewing 2 replies - 1 through 2 (of 2 total)