Download MetaTrader 5

code needed for FILE WRITE / file APPEND in text file as well as csv file

To add comments, please log in or register
Learn operation principles of Trading Signals for MetaTrader.
Selvan
53
Selvan 2015.12.27 06:12 

DEAR SIR,

Please give me simplest sample code for , file write , file  append ( one samples for text file  , and one sample for csv file )

thanks you sir

Carl Schreiber
6592
Carl Schreiber 2015.12.27 08:28  
      string row = "something to write\n";
      int fH = FileOpen(fName,FILE_READ|FILE_WRITE);
      FileSeek(fH,0,SEEK_END); 
      FileWriteString(fH, row, StringLen(row) );
      FileClose(fH);

Your request "Please give me .." sounds more rude than a beggar's one: "Sir, do you have a dime?".

Normally I don't react on that!

If you seek a bit you woould find a lot of examples in the reference or the docs and if you seek a bit more you would find a lot free code..

Well it's Christmas time.

To add comments, please log in or register