Rosh, How are you?

 
Hi Rosh,
Could you please kindly provide the sample code or the EA how can create the data 'text file' and it can be read back by the EA.
Your help will much appreciate.
Thanks in advance.
Shams
shamsulng@yahoo.com
 

Rosh is busy, so this is my 2c worth :)

void WriteIniFile(string strFile)
{


int handle0 = FileOpen(strFile, FILE_CSV|FILE_WRITE, ";");
            
if (handle0 > 0) 
   {

     FileWrite(handle0, "EURUSD", "0.0001", "Y");
     
     FileWrite(handle0, "EURCHF", "0.0001", "N");
     
     FileWrite(handle0, "USDCHF", "0.0001", "N");
     
     FileWrite(handle0, "USDJPY", "0.01", "N");
     
     FileWrite(handle0, "EURJPY", "0.01", "N");
     
     FileWrite(handle0, "AUDUSD", "0.0001", "N");
     
     FileWrite(handle0, "GBPUSD", "0.0001", "F");
     
     FileWrite(handle0, "EURGBP", "0.0001", "F");
     
     FileWrite(handle0, "XXXXXX", "0.0001", "N");
     
     FileWrite(handle0, "XXXXXX", "0.0001", "N");
     
     FileWrite(handle0, "XXXXXX", "0.0001", "N");
     
     FileWrite(handle0, "XXXXXX", "0.0001", "N");    
     
     FileClose(handle0);

  }  
  

return (0);
}


void LoadSymbolArray(string strFile)
  {

   int x=0;
  
   double handle1=FileOpen(strFile, FILE_CSV|FILE_READ, ";");

   if(handle1>0)
    {
     while(FileIsEnding(handle1)==false)  // While the file pointer not at end..
     {  
      // Successive calls to FileReadString pick up chunks ending with the delimiter or the end-of-row
        SymbolList[x][0] = FileReadString(handle1);
        SymbolList[x][1] = FileReadString(handle1);
        SymbolList[x][2] = FileReadString(handle1);
      
      x++;
     } 
      
      FileClose(handle1);
    }
   else 
   {
    Print("INI file missing: ", strFile);
    return (0);
   }

  
  return(0);
  }
  

Good Luck

-BB-

Reason: