Is there any reason why your filename starts with a whitespace? " Spreadsheet.csv "
That may be the problem :)
- Remove the leading and trailing spaces!
- The file will be in the «DataFolder» subfolder. (File (Alt+F) → Open Data Folder). Either File or tester/file.
Is there any reason why your filename starts with a whitespace? " Spreadsheet.csv "
That may be the problem :)
Thank you Mr.Plamen Zhivkov K for your response. But after corrected the white space also I don't find the .csv file anywhere......
- Remove the leading and trailing spaces!
- The file will be in the «DataFolder» subfolder. (File (Alt+F) → Open Data Folder). Either File or tester/file.
Thank you Mr.William Roeder for your response. I have removed the blank spaces. Still I don't see the .csv file anywhere.
Is there any other way to find out the solution? Thanks.....
Are you running the code on a live chart or in the Strategy Tester? If in the Tester, then look in the the "Tester" subfolder, as per the FileOpen() documentation:
EDIT: One more thing, you are not checking your return handle if invalid (namely a file error) nor checking for error codes. How do you know the file was properly created or opened if you don't check?
Follow the example in the documentation so as to improve your implementation.
PS! Just to confirm, this is MT5/MQL5 you are using, right? Or is this a MT4/MQL4 issue?

- www.mql5.com
Are you running the code on a live chart or in the Strategy Tester? If in the Tester, then look in the the "Tester" subfolder, as per the FileOpen() documentation:
EDIT: One more thing, you are not checking your return handle if invalid (namely a file error) nor checking for error codes. How do you know the file was properly created or opened if you don't check?
Follow the example in the documentation so as to improve your implementation.
PS! Just to confirm, this is MT5/MQL5 you are using, right? Or is this a MT4/MQL4 issue?
Thank you Mr.Fernando Carreiro for your response. I am trying this in MT5/MQL5. Now I tried with file error code also.It says file is opened.
But where the file is? I could not find it anywhere with all the searching ways.. Is there any file setting to be done ? Thank you in advance.
You have already been told where it is:
The "live" data sub-folder can be opened from the MetaTrader terminal by pressing [Ctrl+Shift+D] or going to the menu option File → Open Data Folder. From there go to the "MQL\Files" subfolder. For the Strategy Tester, go to the "Tester\Agent-###.###.###.###-####\MQL5\Files".
Also you did not answer the question: Is this on a live chart or in the Strategy Tester?
Please note also, that in your code, you are not detecting for a new bar condition an so, you may be creating the file on every tick.
You have already been told where it is:
The "live" data sub-folder can be opened from the MetaTrader terminal by pressing [Ctrl+Shift+D] or going to the menu option File → Open Data Folder. From there go to the "MQL\Files" subfolder. For the Strategy Tester, go to the "Tester\Agent-###.###.###.###-####\MQL5\Files".
Also you did not answer the question: Is this on a live chart or in the Strategy Tester?
Please note also, that in your code, you are not detecting for a new bar condition an so, you may be creating the file on every tick.
Thanks a lot Mr.Fernando Carreiro for your correct response. Now I found the .csv file. Once again thanks a lot.
We have been telling you where to find it from the beginning, but you did not pay attention.

- 2022.03.12
- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear Friends,
I have made an EA to make a sample csv file.
When I compiled it, everything okay. But I don't find the csv file anywhere, Why.
Can any one help me in this......... Thanks in advance.
Following is my complete code: