Not logged in
Viewing 3 posts - 1 through 3 (of 3 total)

Forums>AlgoWizard / EA Wizard>Application Support>When pending order becomes active…

  • #112324 |
    Participant
    3 Posts

    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.

    #125211
    Mark Fric
    Administrator
    1182 Posts

    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

    #125217
    Participant
    3 Posts

    Owh! Thanks Mark. This should work.

     

    Thanks again.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.