File Function

 
 handle=FileOpen("File1.csv",FILE_CSV|FILE_READ|FILE_WRITE,',');
 FileSeek(handle,0,SEEK_END); 
 FileWrite(handle,Symbol(),TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS),Profit);
 FileClose(handle);

 handle=FileOpen("File1.csv",FILE_CSV|FILE_READ|FILE_WRITE,',');
 FileSeek(handle,0,SEEK_END); 
 FileWrite(handle,Lost);
 FileClose(handle);

Hi,

I  intended to write the "Lost" in the same row after "Profit" but it goes to new line. How to write it in the same row?


Regards 

 
chua le:

Hi,

I  intended to write the "Lost" in the same row after "Profit" but it goes to new line. How to write it in the same row? 

Assuming you'll only append to the last row, you can change:

 FileSeek(handle,0,SEEK_END); 
 FileWrite(handle,Lost);

to:

   FileSeek(handle, -2, SEEK_END);
   FileWrite(handle,"",Lost);
 
Thanks Bro