Program doesn't seem to see all operators

 

Hi, 

Maybe someone have met such a problem before. After I start my EA it places both pending orders, but doesn't print anything. And it doesn't give any error. Just like it didn't see those two "if - else" operators below orders.

Both orders are places correctly, so everything declared inside OrderSend() is also correct.

I am a total newbie... if my question is somehow silly.

int    ticket_01   = 0;  
int    ticket_02   = 0;      



void OnTick()
  {

   if(ticket_01<=0 || ticket_02<=0) 
     {

      ticket_01 = OrderSend(symbol, cmd_1, Vol, OP_01, slippage, SL_01, TP_01, comment, magic, expiration, arrow_color);
      ticket_02 = OrderSend(symbol, cmd_2, Vol, OP_02, slippage, SL_02, TP_02, comment, magic, expiration, arrow_color);

      if(ticket_01<=1)
         Print("Nie udało się wysłać zlecenia ticket_01. Błąd = ",GetLastError());
      else
         Print("Wysłąno pierwsze zlecenie ticket_01");
      if(ticket_02<=1)
         Print("Nie udało się wysłać zlecenia ticket_02. Błąd = ",GetLastError());
      else
         Print("Wysłąno pierwsze zlecenie ticket_02");
     }
 

Don't double post! You already had another thread open.

          General rules and best pratices of the Forum. - General - MQL5 programming forum
 
William Roeder:

Don't double post! You already had another thread open.

          General rules and best pratices of the Forum. - General - MQL5 programming forum
It is a totally different question. Should it be added to previous thread if it refers to the same EA?