Is the file already open?
honest_knave:
Is the file already open?
Should be closed. I create the file with python:
f = open(path_data_new + "test.csv", "wb") writer = csv.writer(f) entries = [0.575673] print(entries) writer.writerow(entries) f.close()
Is the file in the correct folder?
if(!FileIsExist("test.csv")) Print("File not found!");
honest_knave:
Is the file in the correct folder?
Yes, I've found that problem. I was checking everything with the tester and the file has to be in ~/tester/files instead of ~/MQL4/Files
Now, open the file but it returns 0 instead of 0.575673 for current_prob... I'll give a look.
Thank you
P.D. Now, it's OK. I've changed FileReadFloat by FileReadNumber...Manuel Sanchon:
FileReadFloat() is for binary files. Try FileReadNumber() instead.
Yes, I've found that problem. I was checking everything with the tester and the file has to be in ~/tester/files instead of ~/MQL4/Files
Now, open the file but it returns 0 instead of 0.575673 for current_prob... I'll give a look.
Thank you

FileReadNumber - File Functions - MQL4 Reference
- docs.mql4.com
FileReadNumber - File Functions - MQL4 Reference
Thank you very much, it was done :)
Glad to help

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 need to read a .csv file with a single number (say 0.45365345). Depending of this number the expert will make decisions on trading...
I have wrote the following piece of code in the start() function:
However, I always obtain error code 5004. I was looking for more than one hour but every thing I try fails
I have been able to write files without problems...
I would appreciate any help. Thank you in advance