![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Good afternoon. I've got similar problem above. But the problem is, when I just put the filename, I got error 5004. If I specify the path I got 5002. Did I miss something here?
I put the file in Files folder. I've checked it's indeed the file is exist as specified in the filename string.Once again :
Thanks, just want to check can i write my files in a subfolder in this common folder..
Example
Right now it is creating files in " C:\Users\******\AppData\Roaming\MetaQuotes\Terminal\Common\Files
i want files in
C:\Users\******\AppData\Roaming\MetaQuotes\Terminal\Common\Files\1
C:\Users\******\AppData\Roaming\MetaQuotes\Terminal\Common\Files\2
Thanks, just want to check can i write my files in a subfolder in this common folder..
Example
Right now it is creating files in " C:\Users\******\AppData\Roaming\MetaQuotes\Terminal\Common\Files
i want files in
C:\Users\******\AppData\Roaming\MetaQuotes\Terminal\Common\Files\1
C:\Users\******\AppData\Roaming\MetaQuotes\Terminal\Common\Files\2
I think i solved it..
this is working
filename1 = "//1//"+"Summary.csv";
filehandle1=FileOpen(filename1,FILE_COMMON|FILE_WRITE|FILE_CSV);
Hello, I have problems when I run my code in the expert tab it gives me errors 5002 and 5004 2024.08.03 13:06:14.710 LunariaRNNPest (Step Index,H1) Verifying the directory: Common\Files\2 2024.08.03 13:06:14.711 LunariaRNNPrueba (Step Index,H1) Directory verified/created successfully: Common\Files\2 2024.08.03 13:06:14.711 LunariaRNNPreba (Step Index,H1) Trying to create the flag file in: Common\Files\2\Step Index_run_flag.txt 2024.08.03 13:06:14.713 LunariaRNNPrail (Step Index,H1) Error creating flag file for: Step Index. Error: 5004
I am creating this neural network for various symbols. I appreciate your support please
You can't read (or write) outside the sandbox with normal code.
File Write Problem (Error: 5002) - Expert Advisors and Automated Trading - MQL5 programming forum #1-2 (2020)
For security reasons, work with files is strictly controlled in the MQL5 language. Files with which file operations are conducted using MQL5 means, cannot be outside the file sandbox.
FileOpen - File Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
File Write Problem (Error: 5002) - Expert Advisors and Automated Trading - MQL5 programming forum #1-2 (2020)
and FolderDelete using TERMINAL_DATA_PATH - General - MQL5 programming forum (2017)