A DLL-free solution to communicate between MetaTrader 4 terminals using Named Pipes - page 2

 

Hi,

I instaled NamedPipe on different platform MT4 with help description file readme.txt, but when using script ExampleNamedPipeSenderScript

MQL wrote: where is error? Not function this tool :-(

Thanks.

 

Hi,

I instaled NamedPipe on different platform MT4 with help description file readme.txt, but when using script ExampleNamedPipeSenderScript

MQL wrote: Message failed!

where is error? Not function this tool :-(

Thanks.

 

Hi,

 i have the same problem.  when i use the script ExampleNamedPipeSenderScript.mq4

 MQL wrote: Message failed!

 how can i solve it?

Thanks 

 
Alessio Pan:

 i have the same problem.  when i use the script ExampleNamedPipeSenderScript.mq4

 MQL wrote: Message failed!

 how can i solve it? 

MT4 has changed in the 7.5 years since this code was originally written, and the DLL imports needed changing (mainly to handle Unicode strings & functions, though some workarounds in the old code are also no longer necessary).

Attached version runs on current builds of MT4. Should also work on MT5, but that's untested.

However, I wouldn't personally use this code. I'd communicate between MT4 instances using sockets instead of named pipes: https://www.mql5.com/en/blogs/post/706665

 

not working:

For ExampleServer:

'CreatePipeServer' - wrong parameters count ExampleNamedPipeServerEA.mq4 25 4

'arrMessages' - parameter conversion not allowed ExampleNamedPipeServerEA.mq4 51 49

'arrMessages' - invalid array access ExampleNamedPipeServerEA.mq4 51 49

'DestroyPipeServer' - wrong parameters count ExampleNamedPipeServerEA.mq4 37 4


For ExampleSender:

'SendPipeMessage' - wrong parameters count ExampleNamedPipeSenderScript.mq4 24 11


can't be compiled