Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi at all,
in my EA framework i have implement a personal log service, that write a strings file.
This log service, write 2 line strings line at events that i specified it:
1 for infos, and last: "[server time] - last line logged".
In logical function of this log services, for every new line to log,
it set position of the file pointer in this way:
FileSeek([my int file_handle], -nn, SEEK_END);
(where, 'nn' is a number of char that i have calculate there are in string: "[server time] - last line logged",
and i know that it is not godd way, but now i don't have time for implement how program maybe calculate this number)
FileWriteString([my int file_handle], "\r\n");
In this way, it's all right... IF it write in file a line string with greater or equal number char of "[server time] - last line logged".
otherwise, if it log this "[server time] - a=55", this is result:
[server time] - begin log
[server time] - .... ... ... .... ... ....
[server time] - .... ... ... .... ... ....
[server time] - a=55line logged
[server time] - last line logged
There is a way for delete or erase last string line in mql4 ?
For this moment i stay try this way:
FileSeek([my int file_handle], -nn, SEEK_END);
FileWriteString([my int file_handle], "\r\n\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r");
but it a wrong workround...
very thanks at all