- write files in a common directory during an ea optimization
- MQL4 User directory / %USERNAME% variable string
- Open/Write to file outside of MT4 directory
nadiawicket: Can I FileOpen and write other things in my computer or is it just the default /mql/files and the Common Folders that I can open and write to with an EA FileOpen?
| Perhaps you should read the manual.
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. |
You can open, read or write files only inside sandbox (MQL4/files or tester\files if you are in backtesting) due to security reasons. If you want to manage files from / to other directories, you would have to use Windows API functions.
Regards.
You can open, read or write files only inside sandbox (MQL4/files or tester\files if you are in backtesting) due to security reasons. If you want to manage files from / to other directories, you would have to use Windows API functions.
Regards
Perhaps you should read the manual. |
Any info on these windows apis?
google for "mt4 WinApi CreateFileW"
There are some older articles (before b600) they aren't working anymore..
Any info on these windows apis?
Do you think that if you have to ask what Windows API is, that someone can help you in a post or two?
Here : https://msdn.microsoft.com/en-us/library/windows/desktop/ff818516(v=vs.85).aspx (if you plan to have a holiday, scratch it :))
Can I FileOpen and write other things in my computer or is it just the default /mql/files and the Common Folders that I can open and write to with an EA FileOpen?
An alternative would be place a junction of a folder with the files you want to work on in one of the folders of mt4's 'sandbox' e.g. ..\\Common\\Files.
Than you can use the mt4 file function just naturally :)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use