How to print ?

 

Hi,

I am a new user of the MQL4 programming. For a starter the function PRINT is very important in order to debug the program. The problem is that I dont know where this output is presented in my screen ?

Can someone help ?

Thanks

 

Tab "journal"

i prefer writing to a file...

the file is in the experts/files or tester/files folder


///////////////////////// example

extern string FileName="log.txt";

string Text;

int init
{
  FileDelete(FileName) ;
}


int start
{
  Text="Profit "+OrderProfit()+"\n";// \n means new line at the end - each text one line in the file
  Log(FileName,Text);
}


void Log(string FileName,string Text)
{
  int FileHandle=FileOpen(FileName, FILE_BIN|FILE_WRITE|FILE_READ);
  if(FileHandle>0)
     {
      FileSeek(FileHandle, 0, SEEK_END);
      FileWrite(FileHandle,Text) ;
      FileClose(FileHandle);
     }
}
 
meikel wrote >>
Tab "journal"

Thanks