- www.mql5.com
- MetaEditor - Professional editor of trading applications
- MetaTrader 5 Automations
- Algorithmic (automated) trading in MetaTrader 5
Hello, I am just getting started with MT5 and I'm trying the simple script:
void OnStart() { int handle = FileOpen("Z:\\test.dat", FILE_WRITE); Alert(GetLastError()); FileClose(handle); }
Nothing special, just trying to create a file on my Z: drive. The Alter is there because the file is never created and I wanted to see if there was an error. I end up getting a 5002 Error, which according to the documentation is 'Invalid file name'. The filename looks pretty good to me, but maybe there's something to MT that is a bit different from the other languages I've used in the past? Any help appreciated.
--
Burton Samograd
http://kruhft.dyndns.org
- www.mql5.com
Ok, so it looks like you cannot create files outside of the "Files" directory. That seems a bit odd; is that a security feature?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use