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.
To add comments, please log in or register