MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  File functions  FileReadArray

 
int FileReadArray( int handle, void array[], int start, int count)
Reads the specified amount of elements from the binary file into array. Before reading, make sure that the array is large enough. Returns the amount of actually read elements.
To get the detailed error information, call the GetLastError() function.
Parameters:
handle   -   File handle returned by the FileOpen() function.
array[]   -   Array where data will be stored.
start   -   Starting position for storing in array.
count   -   Count of elements to be read.
Sample:
  int handle;
  double varray[10];
  handle=FileOpen("filename.dat", FILE_BIN|FILE_READ);
  if(handle>0)
    {
     FileReadArray(handle, varray, 0, 10);
     FileClose(handle);
    }