Taking into account the fact that mql4/5 lacks the possibility of multithreading, making a server on mql4/5 is like watching a tube TV (it seems to work, but the feeling is not the same. That's why it's better to write a separate server and use it to transfer data between mql programs.
Side Note: To read/write on Client Side (e.g from another Metatrader Terminal ), I just used the standard MQL5 FilePipe Library. Examples how to use them can be downloaded here:
Many developers face the same problem - how to get to the trading terminal sandbox without using unsafe DLLs. One of the easiest and safest method is to use standard Named Pipes that work as normal file operations. They allow you to organize interprocessor client-server communication between programs. Take a look at practical examples in C++ and MQL5 that include server, client, data exchange between them and performance benchmark.
It's been a while since there was an update here... I'm seeing "Access Violation" error when I attach the indicator to the chart. Guess there's no way to make this work.
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.
I also faced access violation errors when calling the methods writeTick, readTick... and so on. Find the fixed CNamedPipes file attached.
I also added the WriteDouble Method to the CNamedPipe Class:
Side Note: To read/write on Client Side (e.g from another Metatrader Terminal ), I just used the standard MQL5 FilePipe Library. Examples how to use them can be downloaded here:
https://www.mql5.com/en/articles/503