Discussion of article "A DLL-free solution to communicate between MetaTrader 5 terminals using Named Pipes" - page 3

 
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.
 
Hi, is this still a working product? If not, can it be updated to work under the latest MT5 build? Right now it's throwing an 'Access Violation'
 

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:

#import "kernel32.dll"
...
int WriteFile(ulong fileHandle,double &var,int bytes,int &numOfBytes,ulong overlapped);
...
#import

...

bool CNamedPipe::WriteDouble(double data)
  {
   int data_size = sizeof(data);
//--- check parameters
   if(!data || data_size<1) return(false);

//--- send data
   int written;
   if(!WriteFile(hPipe,data,data_size,written,NULL) || written!=data_size)
      return(false);
//--- ok
   return(true);
  }


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

Communicating With MetaTrader 5 Using Named Pipes Without Using DLLs
Communicating With MetaTrader 5 Using Named Pipes Without Using DLLs
  • www.mql5.com
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.
Files:
 
fantastic work
 
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.