Somebody please help, my EA doesn't open multiple orders at once

 

Hi All, 

Please, I need help with my EA, attached. It only opens one order at once, even when I have multiple signals at once. 

It will only open one order, and it will not open another on a different pair until the opened order has been closed. It has a Magic number, and I make sure that each pair has a different Magic number, but i 

think it is not respecting it. Any help will be appreciated. 

Thank you.

Files:
Goodwill.mq4  13 kb
 
willy111:

Hi All, 

Please, I need help with my EA, attached. It only opens one order at once, even when I have multiple signals at once. 

It will only open one order, and it will not open another on a different pair until the opened order has been closed. It has a Magic number, and I make sure that each pair has a different Magic number, but i 

think it is not respecting it. Any help will be appreciated. 

Thank you.

Can you copy paste what you see in the journal logs here?

 
Qoyyuum Kadir:

Can you copy paste what you see in the journal logs here?

The message on the journal is that the "expert advisor is loaded successfully".

it works very well, but the only problem is that when i have multiple signals on many pairs, it will only open one order and ignore the rest. But when that order is closed, it will open another order on another pair that has a valid signal.

 

Please I am having the same issue. I really need help on this. Here is my code for entering order.... I also change the magic number on each pair, but it is not responding to many trades at a time

double bsl, ssl, btp, stp;// bsl=buy stop loss, ssl = sell stop loss, btp = buy take profit, stp = sell take profit
 
  void OrderEntry (int direction)
    {
      if(direction==0)
      {
         bsl=0;
         btp=0;
      if(StopLoss!=0)bsl=Ask-(StopLoss*pips); ///////
      if(TakeProfit!=0)btp=Ask+(TakeProfit*pips);
      if(OrdersTotal() == 0)     
      ticket = OrderSend (Symbol(),OP_BUY,LotSize,Ask,3,bsl,btp,NULL,MagicNumber,0,Blue);
       }


  
      if(direction==1)
       {
         ssl=0;
         stp=0;
       if(StopLoss!=0)ssl = Bid+(StopLoss*pips);/////
       if(TakeProfit!=0)stp = Bid-(TakeProfit*pips);
       if(OrdersTotal() == 0)
       ticket = OrderSend (Symbol(),OP_SELL,LotSize,Bid,3,ssl,stp,NULL,MagicNumber,0,Red);
       }
         
   }

Basic Principles - Trading Operations - MetaTrader 5
Basic Principles - Trading Operations - MetaTrader 5
  • www.metatrader5.com
is an instruction given to a broker to buy or sell a financial instrument. There are two main types of orders: Market and Pending. In addition, there are special Take Profit and Stop Loss levels. is the commercial exchange (buying or selling) of a financial security. Buying is executed at the demand price (Ask), and Sell is performed at the...
Reason: