MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  File functions  FileReadString

 
string FileReadString( int handle, int length=0)
The function reads the string from the current file position. Applies to both CSV and binary files. For text files, the string will be read before the delimiter. For binary file, the given count of characters will be read to the string. To get the detailed error information, one has to call the GetLastError() function.
Parameters:
handle   -   File handle returned by the FileOpen() function.
length   -   Amount of characters for reading.
Sample:
  int handle;
  string str;
  handle=FileOpen("filename.csv", FILE_CSV|FILE_READ);
  if(handle>0)
    {
     str=FileReadString(handle);
     FileClose(handle);
    }