Would it be possible to Print() on a private LOG file ?

 

Hi,

I'd like to Print() on a specific Log file in order to get easily to my own messages and not get mixed with an useless stuff.

TIA

Best regards

BBF

 
use file operation is OK.
 
DxdCn wrote >>
use file operation is OK.

Hi, DxdCn

Thanks a lot for your very fast answer. In fact you made me discover those functions. Grat ... but not very easy for me.

Would you be kind enough to show me an example ? perhaps an (easy) indicatot or an EA that makes what I intend to do ?

Once again TIA

Best regards

BBF

 
BIGBLACKFEET:

Hi, DxdCn

Thanks a lot for your very fast answer. In fact you made me discover those functions. Grat ... but not very easy for me.

Would you be kind enough to show me an example ? perhaps an (easy) indicatot or an EA that makes what I intend to do ?

Once again TIA

Best regards

BBF

Here you are:

int    handle;


//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
      
   handle=FileOpen("MyFile.data", FILE_CSV|FILE_READ|FILE_WRITE, ';'); 
      
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
   FileClose(handle);
//----
   return(0);
  }

//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
   
   // ... your calculations here
   // double val=Bid/point;      
      
   if(handle>0)
    {
     FileSeek(handle, 0, SEEK_END);
     FileWrite(handle, val);
    }

   
//----
   return(0);
  }
//+------------------------------------------------------------------+
Cheers
 
ggekko wrote >>

Here you are:

Cheers

Hi, ggekko

I was far from any computer this WE and I'm just discovering your very kind and very helpful answer.

Thanks a lot. As soon as this tomorrow morning I'll use this piece of software with my EA.

Best regards

BBF

Reason: