Not logged in

Forums

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

Forums>EA Wizard>Strategy Samples>Check Pending Order Exits Across Multiple Symbols

  • #117309 |
    Moderator
    2349 Posts

    Hello,

     

    this function checks if a pending order exits in another market. You can run this in EURUSD and check order in GBPUSD for example

     

    Code for EA Wizard / code / CustomFunctions.mq4

    int sqPendingOrderSymbolExists(int orderMagicNumber, string strSymbol) {
       for (int cc = OrdersTotal() - 1; cc >= 0; cc--) {
          if(OrderMagicNumber() == orderMagicNumber || OrderSymbol() == strSymbol) return 1; 
       }
    
       return 0;
    }
    

    It can be used in Wizard as shown in the example

    Attachments in this forum are visible only for registered users.
    #144674
    Participant
    17 Posts

    Hallo,

     

    I was in holiday in the last time. So I have see your awnser today. Mutch THANKS !!!!!! to you for perfect help. !!!!  🙂  🙂  🙂  🙂  🙂

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

You must be logged in to reply to this topic.