Hi,
I am using this functions:
https://www.mql5.com/en/articles/1540
How should I clear the text in my csv-File?
Should I delete it and create it new, or is there a better way?
I tried it that way:
int ClearFile (string path) { int result; int handle=_lopen (path,OF_WRITE); result=_llseek (handle,0,0); result=_lwrite (handle," ",1); result=_lclose (handle); if(result<0) { return(-1); } return(1); }
But this does only overwrite the first letter.
Does it works, when I delete the file an create it.
What is, when another expert advisor want's to read the file just at this moment?
I tried it that way:
But this does only overwrite the first letter.
Does it works, when I delete the file an create it.
What is, when another expert advisor want's to read the file just at this moment?
Silly question, but how can I delete it??
Silly answer : I dunno.
Sorry :(
Silly question, but how can I delete it??
How can you delete the file ? FileDelete() ?
The old trick to handling 2 applications or EAs looking at the same file was to write the file with a name of xxxx and when the file is complete to rename it to yyyyy rather than creating it with the correct name in the first place. You can't rename using standard mql4 functions but maybe you can with a kernel32 call . . . or similar.
How can you delete the file ? FileDelete() ?
The old trick to handling 2 applications or EAs looking at the same file was to write the file with a name of xxxx and when the file is complete to rename it to yyyyy rather than creating it with the correct name in the first place. You can't rename using standard mql4 functions but maybe you can with a kernel32 call . . . or similar.
Sunshineh, was using this article https://www.mql5.com/en/articles/1540 . The file may be created outside experts/file folder.
Sunshineh, I prefer to use what you have tried there, but I guess you have to write a lot of lines :(
Sunshineh, was using this article https://www.mql5.com/en/articles/1540 . The file may be created outside experts/file folder.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am using this functions:
https://www.mql5.com/en/articles/1540
How should I clear the text in my csv-File?
Should I delete it and create it new, or is there a better way?