Hello you can use
"\n"
For new line and you can also use
FILE_TXT
Marco vd Heijden:
Thank you, but can Excel read it afterwards?
Hello you can use
For new line and you can also use
Eleni Anna Branou:
Please use the </> button to insert your code.
Sorry I did not know this button.
int Statistic() { double spread = NormalizeDouble(Ask - Bid, 1); int handle = FileOpen(Log_Filename,FILE_CSV|FILE_READ|FILE_WRITE,';'); if (handle>=0){ FileSeek(handle,0,SEEK_END); FileWrite(handle, spread); } FileClose(handle); Log_Time += Log_Interval; }
Thank you again
FileWriteString(fileHandle,fibo_level+"\r\n"+fibo_color+"\r\n"+fibo_line+"\r\n"+fibo_name);
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
HI together!
I want to write eg the spread in a csv file line by line for different times (eg every 10 min), but cannot set the pointer to the correct line (= the next free line).
It always writes the data into the same line. nevertheless i can read an open the file with notepad or Excel. But I always get only on line.
......
int handle = FileOpen(Log_Filename,FILE_CSV|FILE_READ|FILE_WRITE,';');
if (handle>=0){
FileSeek(handle,0,SEEK_END);
FileWrite(handle, date, time, spread);
}
FileClose(handle);
......
So can please anybody tell me, how to do to get the data every (eg 10 min) in a new line ?
Thanks Trungs