CSV file access

 

Hey guys, I´m having trouble to access a CSV file in COMMON files. At first, my EA has no problem reading it, but if another software access it, changing it´s value, from that moment my EA will only read 0 value, without any registered error, although the value is different when I access the csv file. I believe MQL5 has a something like a protected sandbox that doesn´t allow file changes to be read, and I cant get passed it.

Did anybody have any issues with this? Here´s a glance of the code:

   string InpDirectoryName = TerminalInfoString(TERMINAL_COMMONDATA_PATH);
   string filename;
   StringConcatenate(filename,InpDirectoryName,"\\Files\\",InpFileName);
   int file_handle = FileOpen(InpFileName,FILE_READ|FILE_CSV|FILE_COMMON);
   int num = 0;
   if(file_handle!=INVALID_HANDLE)
     {
      num = (int) FileReadNumber(file_handle);
      FileClose(file_handle);
     }
 
   string InpDirectoryName = TerminalInfoString(TERMINAL_COMMONDATA_PATH);
   string filename;
   StringConcatenate(filename,InpDirectoryName,"\\Files\\",InpFileName);
   int file_handle = FileOpen(InpFileName,FILE_READ|FILE_CSV|FILE_COMMON);
You are trying to read
C:\user\«UUUU»\appdata\roaming\metaquotes\terminal\common\C:\user\«UUUU»\appdata\roaming\metaquotes\terminal\common\files\InpFileName
and that path does not exist. Perhaps you should read the manual.

    How To Ask Questions The Smart Way. 2004
      How To Interpret Answers.
          RTFM and STFW: How To Tell You've Seriously Screwed Up.