MT4
MT4读取文件函数
回复:0  浏览:204
  • 楼主admin 圈主
  • 2019-05-05 14:33
void ReadFile()
   {
    int cmd = 0;
    string str = "";
    int handle=FileOpen("TradeCopy.csv",FILE_READ|FILE_CSV);
    if (handle>0)
     {
      while(FileIsEnding(handle)==false)
       {
        str = FileReadString(handle);
        if (str!="")
         {
          lines[cmd] = str;
          cmd ++;
         }
       }
     FileClose(handle);
    }
    else
     Print("Chyba pri otvarani : ",GetLastError());
  }