To be perfectly honest, I spent 30 minutes trying to figure this thing out and face exactly the same problem as jollydragon. Trial and error helped me to find the correct way and only then I saw your remark about the "//incorrect way of opening". THIS IS HIGHLY CONFUSING! I am coding for several hours and my eyes mey get tired- feeding me roadbumps like that DOES NOT help.
I know this is 2.5 years late, but maybe somebody is reading this and is looking for an answer:
I had the same issue and solved it as follows:
The solution is simple:
1- Copy or move the file you want to use to ....................\MQL4\Files (the dots should be replaced with the path to your MetaQuotes Terminal folder)
2- Change the line of code to the following:
int file_handle=FileOpen("................csv",FILE_READ|FILE_CSV,','); (the dots should be replaced with your filename.
ahdad: Copy or move the file you want to use to ....................\MQL4\Files (the dots should be replaced with the path to your MetaQuotes Terminal folder)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
//--- incorrect file opening methodshowing what not to do. No correction required.What you pasted had the lineshowing what not to do. No correction required.
I know this is 2.5 years late, but maybe somebody is reading this and is looking for an answer:
I had the same issue and solved it as follows:
The solution is simple:
1- Copy or move the file you want to use to ....................\MQL4\Files (the dots should be replaced with the path to your MetaQuotes Terminal folder)
2- Change the line of code to the following:
int file_handle=FileOpen("................csv",FILE_READ|FILE_CSV,','); (the dots should be replaced with your filename.
And it should work without a problem.