Questions from Beginners MQL4 MT4 MetaTrader 4 - page 146

 
maybe some dll libraries are missing?
 
azsxg8181:   Maybe you are missing some dll libraries?

Most likely, you put the terminal on the system drive and in the Program Files folder.

If so, choose another drive. Or at least to the root of your system drive. At the start of the installation there is a Setup button

 
This is clearly a childish question, so it's this way.
Somehow I didn't pay attention to it before. The note to the description of the IndicatorDigits function says the following:
By default, the price accuracy of the financial instrument to whose chart the indicator is attached is used.
In fact, I observe five digits in the data window:
  • The default setting is 4 digits ;
  • if IndicatorDigits(Digits) is explicitly specified - 5.
Is it a glitch or what?
 
Please help! I can't read the file
int File()
{
int P=0;
int filehandle=FileOpen("C:\\Users\\Михаил\\Desktop\\qqq.csv",FILE_READ|FILE_CSV); 
if(filehandle!=INVALID_HANDLE) 
     { 
     datetime d = FileReadDatetime(filehandle);
     int I=FileReadNumber(filehandle);
     FileClose(filehandle);
     Comment(d+" "+I);
     }
     else {Comment(GetLastError());}
return P;

}
Error 5002- Invalid file name

Although the file exists


 
Mikhail Simakov:
Please help me! I can't read the fileImits error 5002 - Invalid filename

Although the file exists

FileOpen

For security reasons, the MQL5 language strictly controls operations with files. The files that are handled by the MQL5 language file operations cannot be outside the file "sandbox".

If you want to work with directories outside the sandbox, create a shortcut/symbolic link to the necessary directory with"MQL4\\Files" in it.
 
Konstantin Nikitin:

FileOpen

If you want to work with directories outside the sandbox, create a shortcut/symbolic link to the required directory in it"MQL4\\Files".

OK, copied the file to the Files folder, redid the code, same error

int File()
{
int P=0;

int filehandle=FileOpen(TerminalInfoString(TERMINAL_DATA_PATH)+"\\MQL5\\Files\\"+"qqq.csv",FILE_READ|FILE_CSV); 
if(filehandle!=INVALID_HANDLE) 
     { 
     datetime d = FileReadDatetime(filehandle);
     int I=FileReadNumber(filehandle);
     FileClose(filehandle);
     Comment(d+" "+I);
     }
     else {Comment(GetLastError());}
return P;

}
 
Mikhail Simakov:

OK, copied the file to Files, redid the code, same error

int filehandle=FileOpen("qqq.csv",FILE_READ|FILE_CSV); 

That's enough. There's a pretty good example given there, with the wrong, and the right file opening.

 
Konstantin Nikitin:

That's enough. There's a pretty good example given there, with the wrong, and the right opening of the file.

when testing an EA, where should the read-only file be located?

 
Mikhail Simakov:

when testing an EA, where should the read file be located?

This is from MQL5, but the essence is the same.

 
Konstantin Nikitin:

This is from MQL5, but the essence is the same.

I found the directory the program accesses, but for some reason it deletes this file qqq.csv during testing

Reason: