MQL4 Reference File Functions FileFlush
Writes to a disk all data remaining in the input/output file buffer.
[in] File descriptor returned by FileOpen().
No value returned.
When writing to a file, the data may be actually found there only after some time. To save the data in the file instantly, use FileFlush() function. If the function is not used, part of the data that has not been stored in the disk yet, will be forcibly written there only when the file is closed using FileClose() function.
The function should be used when written data is of a certain value. It should be kept in mind that frequent function call may affect the program operation speed.
Function FileFlush () must be called between the operations of reading from a file and writing to it.