Put the FileSeek() before FileWrite()

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
string file_name=Symbol()+"-LOG\\["+Year()+"-"+Month()+"-"+Day()+"].csv";
int file_handle=FileOpen(file_name,FILE_CSV|FILE_READ|FILE_WRITE,",");
if(file_handle!=INVALID_HANDLE){
FileWrite(
file_handle,
logdata_str[_index][0],
logdata_str[_index][1],
logdata_str[_index][5]
);
FileSeek(file_handle, 0, SEEK_END);
FileClose(file_handle);
}
else{
Print(GetLastError());
}
}
Thanks for your help.