ERROR ON FileReadString/FileReadDouble

 
Hi guys, i'm trying to comunicate my EA with another program trhough text, or csv files. But when i try to read a file with the Meta Trader 5 it returns zero, even though the file is not empty. My code is something like:
string fileName = "teste_leitura.txt";

int OnInit()
  {
//---
   int file_handle=FileOpen(fileName,FILE_READ|FILE_BIN|FILE_ANSI|FILE_TXT);
   if(file_handle>0)
     {
      
      double value = FileReadString(file_handle);
      FileClose(file_handle);
      PrintFormat("File %s read , value %f",fileName, value);
     }
   else
      PrintFormat("Error when trying to read %s",fileName);
   
//---
   return(INIT_SUCCEEDED);
  }

I tried it in different computers and it doesn't work at all. Please help me!

 

Your file flags doesn't make sense

int file_handle=FileOpen(fileName,FILE_READ|FILE_BIN|FILE_ANSI|FILE_TXT);

A file can't be open as bin and as text at the same time.

Reason: