Download MetaTrader 5

Is the File Name Wrong? - page 2

To add comments, please log in or register
whroeder1
15592
whroeder1  
jollydragon: What I pasted was copied from "help book" of MetaQuotes, which needs correcting.
What you pasted had the line
//--- incorrect file opening method
showing what not to do. No correction required.
moonsboy
891
moonsboy  
WHRoeder:
What you pasted had the lineshowing what not to do. No correction required.
Oh, yes. Sorry for neglecting it. 
Adam
21
Adam  
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.
ahdad
9
ahdad  

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.

whroeder1
15592
whroeder1  
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)
Correct.
  1. The "......" is the Data Folder. Data Structure in MetaTrader 4 Build 600 and Higher - MQL4 Articles 17.02.2014
  2. Replace the MQL4 with tester when testing.
12
To add comments, please log in or register