Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 443

 
Zver4991:

Well, I have seen these, but there are only error codes returned by the trading server.... or only they need to be processed for normal operation of the advisor.....a list of error codes of all functions can all be seen somewhere?
How about a closer look? There are other errors at the bottom.
 
Zhunko:
How about a closer look? The rest of the errors are down there.


So there are no codes between 150 and 4000, or are there?
 

An hour ago, after rebooting my computer, suddenly MQL5 is being imposed on my account instead of my usual MQL4. I can't go back. How can I go back? Thank you. Yuri.

 
Yury2:

An hour ago, after rebooting my computer, suddenly MQL5 is being imposed on my account instead of my usual MQL4. I can't go back. How can I go back? Thank you. Yuri.

Is it the terminal? Look at Help --> About...
 
Yury2:

An hour ago, after rebooting my computer, suddenly MQL5 is being imposed on my account instead of my usual MQL4. I can't go back. How can I go back? Thank you. Yuri.


there's no going back... :-)))
 

Hello, where's the error???


Print outputs 0 in both the first and second cases... what's wrong?!

      int i=1, op_buy, op_sell;
 while(i<=OrdersTotal()){
      OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
      if(OrderType()==OP_BUY && OrderMagicNumber()==Magic)
         op_buy=OrderTicket();
         Print("Ticket buy "+op_buy);
         ibuy = 1;
      if(OrderType()==OP_SELL && OrderMagicNumber()==Magic)
         op_sell=OrderTicket();
         Print("Ticket sell "+op_sell);
         isell = 1;
      i++;
 }
 
nr72:

Hello, where's the error???


Print outputs 0 in both the first and second cases... what's wrong?!


  Print("Ticket buy "+op_buy);  по-моему в этих принт не соблюден синтаксис кода. Print("Ticket buy ",op_buy); правильнее
https://docs.mql4.com/ru/common/print
 
Corrected the syntax in Print, but still no order numbers appeared in the op_buy and op_sell variables...
 
nr72:
Corrected the syntax in Print, but still no order numbers appeared in the op_buy and op_sell variables...
It means that the code is built incorrectly, you have both if statements without body in {} and "not less" written together - you should be more careful in life, dismantle/write the code in smaller parts - my advice.
https://docs.mql4.com и codebase смотрите
 
nr72:

Hello, where's the error???


Print outputs 0 in both the first and second cases... what's wrong?!

`
nr72:
Corrected the syntax in Print, but still no order numbers appear in the op_buy and op_sell variables...
Maybe, the MODE_TRADES condition is not fulfilled, there are no open trades in the place where you launch it