delete the content of a file without deleting the file?

Back to topics list  | 1 2 To post a new topic, please log in or register
DeepThought 2014.06.14 18:37 #

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.

Back to topics list   | 1 2  

To add comments, please log in or register