Errors, bugs, questions - page 2462

 
astronom55:
Hello. The MT5 mobile version is not connecting to my Alpari broker. What is the problem? Will it be fixed at some point?

Here.

 
Sergey Dzyublik:

The same is written inStringToShortArray:

However, this does not prevent it from adequately handling NULL characters in string.

ShortArrayToString( array, start, count ) worksincorrectly: terminal 0 is not any 0, only the one at the end. In this case end or not end can be determined based on ArraySize( array ). At least if count is set explicitly, the resulting string must be not shorter than min( count, ArraySize( array ))

And StringToShortArray( text, array, start, count ) works correctly: the terminal 0 is the one at the end. And the end is determined based on StringLen( text )

 
Artyom Trishkin:

Here.

  • You have not provided anyspecific material so that your problem can be addressed. -All Android users have this problem
  • Your question is so broad that it cannot be answered unambiguously without clarification - Ask what you don't understand.
  • You are just a lazy person who does not readthe documentation. Most of your problems simply stem from ignorance of the basic concepts of the MQL language - I think this is not in the documentation.
  • You are banned from google or you just don't know how to usethe search- the search yielded no results.

1


This is just some of the feedback on the mobile version of MT5.

2

This is the Alpari forum

Don't you know anything about it?

Справочник MQL4
Справочник MQL4
  • docs.mql4.com
MetaQuotes Language 4 (MQL4) - встроенный язык программирования торговых стратегий, разработанный компанией MetaQuotes Software Corp. на основе своего многолетнего опыта в создании торгово-информационных платформ. Этот язык позволяет писать собственные программы-эксперты (Expert Advisors), автоматизирующие управление торговыми процессами и...
 

when running the script


#include <Files\FileTxt.mqh>
void OnStart(){

  CFileTxt file;
  int handle = file.Open( "test.bat", FILE_WRITE | FILE_ANSI | FILE_REWRITE ); //
  if( handle == INVALID_HANDLE ){
    int error = GetLastError();
    Print("Ошибка создания файла, код ошибки ",  error );
    return;
  }
}


error





What's the reason?


If you change the file name


int handle = file.Open( "test", FILE_WRITE | FILE_ANSI | FILE_REWRITE ); //

no error

 
Aleksey Sergan:

when running the script

error

What's the reason?

If you change the file name

no error

The file name is the problem.
Prohibited operation of "executable" files (exe, msi, bat, ...).

 
Sergey Dzyublik:

The file name is the problem.
The creation of "executable" files (exe, msi, bat, ...) is forbidden.

Yes, indeed it is. I couldn't find anything in the help about that.

 

It may be irrelevant, but strictly speaking in the error message at compilation

void A::operator=(const A&) here (where the arrow is) is unnecessary (the more so because it is generated the same way by default)

 
This is the 4th time in a day I've encountered a problem with 100% CPU hang-up of ME (build 2037).

Initially 100% core load appears, but ME works fine - you can even run code debugging in MT.
However, if you try to switch to another tab with source code - ME hangs completely (need to kill process), and new tab window still won't open (hangs in half-open state).
If I don't switch to a new tab, just close ME, the process won't close, but will become a child process of MT and will continue to load 100% of kernel.

The problem arises on plain site, just during code development (small project, 8 files <3K lines in total), ME code intellisense crashes presumably.
 
Hooray, we managed to catch the code that "crashes" the ME analyser.
ME crashes on start-up. It is impossible to run the ME without first editing the code in another editor.

If necessary, the source code will be provided to the developers in 5-7 days.
The problem arose with the string:
if(
Something must be wrong with counting unclosed parentheses.
 
Again an hour of searching for errors in the project code has led to the "specifics" of MT5 (build 2049).

In the terminal some part of the Expert Advisor's logs may simply not be displayed, without notifying the user about it.
The logs are in the log file - everything is OK there.

#define  PRINT(x) Print(#x, ":", string(x))

void OnStart(){  
   string test_name;
   string test_result;  
   
   test_name = "394_TEST_____";
   for(int i = 0; i < 394; i++){
      PRINT(test_name + string(i+1));
   } 
   test_result = "RESULT_SUCCESS";
   PRINT(test_result);
   Sleep(5000);
   
   
   test_name = "395_TEST_____";
   for(int i = 0; i < 395; i++){
      PRINT(test_name + string(i+1));
   } 
   test_result = "RESULT_SUCCESS";
   PRINT(test_result);
   Sleep(5000);

   
   test_name = "396_TEST_____";
   for(int i = 0; i < 396; i++){
      PRINT(test_name + string(i+1));
   } 
   test_result = "RESULT_SUCCESS";
   PRINT(test_result);
   Sleep(5000);
}

Somehow the log queue somehow displays record with number 395, all records before and after this number are displayed in МТ log.
Thus test #395 always fails.