That function is for reading binary data. It should not be used for textual files like CSV.
FileReadStruct
The function reads contents into a structure passed as a parameter from a binary-file, starting with the current position of the file pointer.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm using the FileReadStruct function to read and copy data from a CSV file. However, the algo returns the 'array out of range' error (see execution_report file). I'm following the documentation available on https://www.mql5.com/en/docs/files/filereadstruct
The CSV contains three columns (file attached to this post), with the first and the second column being datetime type and the third being double type.
Any idea on how to solve this issue?
Cheers!