Still doesn't seem to work.
string common_data_path=TerminalInfoString(TERMINAL_COMMONDATA_PATH); int FileHandle = FileOpen(common_data_path+"\\thefile.txt",FILE_WRITE|FILE_CSV|FILE_COMMON); FileWrite(FileHandle,TimeCurrent()); FileClose(FileHandle);
nevermind, eventually got it, no need for common_data_path.
Thanks!
Solution in case anyone ever searches this topic with the same problem as me:
int FileHandle = FileOpen("thefile.txt",FILE_WRITE|FILE_CSV|FILE_COMMON); FileWrite(FileHandle,TimeCurrent()); FileClose(FileHandle);
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
I tried writing to the following common MT4 folder in Windows 8 but it isn't working:
Do I have the right common folder and/or the right name format?
Edit: additional info:
I can write fine to the terminal's folder C:\Users\<name>\AppData\Roaming\MetaQuotes\Terminal\2DDC50D2844ACA35FFD080E7BF7EC474\MQL4\Files by removing the BaseDirectory+ and \\.