MQL file operations are restrictive to specific folders only.
RTFM
string _DirectoryPath = TerminalInfoString(TERMINAL_DATA_PATH); string _DirectorySub = "\\MQL4\\Experts\\Notes\\"; ⋮ FileOpen(_DirectoryPath+_DirectorySub+_FileName, …
You are trying to write to C:\Users\«username»\AppData\Roaming\MetaQuotes\Terminal\«hexString»\MQL4\Files\C:\Users\«username»\AppData\Roaming\MetaQuotes\Terminal\«hexString»\MQL4\Experts\Notes\«fileName» which is an invalid path (semicolon.)
Perhaps you should read the manual.
and FolderDelete using TERMINAL_DATA_PATH - General - MQL5 programming forum 2017.12.13
You are trying to write a file to a directory which is not allowed. Only certain directories predefined by MQL4/5 are allowed.
Read this page of the manual: https://www.mql5.com/en/docs/files
Documentation on MQL5: File Functions
- www.mql5.com
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. the common folder for all the terminals installed on a computer - usually located in the directory C:\Documents and Settings\All Users\Application...
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
Hello Folks,
I'm very new to MQL programming.
I just start coding to write LAST TRADED PRICE in external text file. All my effort are failed.
Below is my code. Can anyone please correct my code.
Thanks in advance.