Download MetaTrader 5

FileOpen issue

To add comments, please log in or register
Marc Boggs
719
Marc Boggs 2016.07.02 17:36 

      int handle = FileOpen(TickFile,FILE_READ|FILE_CSV,',');       if(handle < 1)       {            string strErr = Error(GetLastError());          Print("Cannot open file " + TickFile + ": " + strErr);          return(false);       }

I'm having a problem opening an ANSI csv file.  The file has full access permission for all users.  

I've tried putting it in:
"C:\Program Files (x86)\MetaTrader 4 at FOREX.com"
"C:\Program Files (x86)\MetaTrader 4 at FOREX.com\MQL4\Experts"
"C:\Program Files (x86)\MetaTrader 4 at FOREX.com\history"  (With FileOpenHistory)

Also specified the absolute file path.

The handle is always -1.  datafile attached. 

Any ideas?  

Thanks in advance.

Files:
test..txt 1527 kb
To add comments, please log in or register