delete the content of a file without deleting the file? - page 2

 

I occasionally use files to communicate between mql4. Opening and closing the file is quite fast, you do not need to worry about them if you need to fit under 1 ms. Moreover, you do not need to use CSV format, with the current struct syntax you can save and read data with a single command.

The real bottleneck is the way how you notify the receiver (file reader). Posting a message to trigger OnTick or OnCalculate is quite slow in MT4 and would cost you several ms of delay.

The fastest result I got with EA reading the file in a 1ms loop.

Just one more note - the read-in data are sometimes defective (unfinished), use some integrity check and re-read the file if the check fails.

 
Syed Naufal Gaddafi #:

I believe the objective is ...

how eraise it?

 
ejmin ejoni #: how eraise it?

What part of #2 was unclear to you?

Reason: