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.
在调用 writeTick、readTick......等方法时,我还遇到了访问违规错误。请查看附件中已修复的 CNamedPipes 文件。
我还在 CNamedPipe 类中添加了 WriteDouble 方法 :
附注:要在客户端读/写(例如从另一个 Metatrader 终端),我只是使用了标准的 MQL5 FilePipe 库。如何使用它们的示例可在此处下载:
https://www.mql5.com/zh/articles/503