roley: I want to create a file but not in the terminal folder but out of it. My code works when I dont use a long path ("C:\Users\probe.csv"), but if I do, than it does not work. What is the problem?
You should read the documentation when in doubt:
FileOpen
The function opens the file with the specified name and flag.
....
Note
For security reasons, work with files is strictly controlled in the MQL4 language. Files with which file operations are conducted using MQL4 means, cannot be outside the file sandbox.
The file is opened in the folder of the client terminal in the subfolder MQL4\files (or Tester\Files in case of testing). If FILE_COMMON is specified among flags, the file is opened in a shared folder for all MetaTrader 4 client terminals.
PS! Your code seems to be MQL4, so I provided the MQL4 version, but the same applies to MQL5 too.
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
Hi!
I want to create a file but not in the terminal folder but out of it. My code works when I dont use a long path ("C:\Users\probe.csv"), but if I do, than it does not work. What is the problem?