string t = TerminalInfoString(TERMINAL_COMMONDATA_PATH); string Fcsv = t+"\\MA\\Test.csv";
No, NO, NO! Do not add path to filenames.
File Write Problem (Error: 5002) - Expert Advisors and Automated Trading - MQL5 programming forum #1-2 2020.06.12
and FolderDelete using TERMINAL_DATA_PATH - General - MQL5 programming forum 2017.12.13
William Roeder:
No, NO, NO! Do not add path to filenames.
File Write Problem (Error: 5002) - Expert Advisors and Automated Trading - MQL5 programming forum #1-2 2020.06.12
and FolderDelete using TERMINAL_DATA_PATH - General - MQL5 programming forum 2017.12.13
Thanks and ok!
Haven't done it for some time and I copied the example from the reference of FileOpen:
string terminal_data_path=TerminalInfoString(TERMINAL_DATA_PATH); string filename=terminal_data_path+"\\MQL5\\Files\\"+"fractals.csv"; int filehandle=FileOpen(filename,FILE_WRITE|FILE_CSV);
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
Is there a mistake of mine (b.2615) or is it impossible to access the Common folder from the debugger and/or indicator?
This little piece of code at the end of OnInit():
causes:
2020.09.22 11:59:52.838 myIndi (EURUSD,M5) FName: C:\Users\cas\AppData\Roaming\MetaQuotes\Terminal\Common\MA\Test.csv Common: C:\Users\cas\AppData\Roaming\MetaQuotes\Terminal\Common Hdl: -1 err: 5008
5002 = ERR_WRONG_FILENAME 5002 Invalid Filename
5008 = ERR_WRONG_FILEHANDLE 5008 Invalid handle
PS: Of course the Common folder exists and is accessible.
PPS: Even without using the path to Common I get this error: