run two Expert Advisors and communicate between them (message passing between them both)

leoni loris
21

I need to run two expert advisors and one needs to send messages to the another.

how do I do that?

Anthony Garot
5603
Anthony Garot  
In addition to the answers given, you can use files if they're on the same machine, and/or sockets if they are not.
Stanislav Korotky
37001
In fact, more options are available, just specify what is your use case and requirements.
leoni loris
21
leoni loris  

I'm using a solution with ZeroMQ where I can send messages to a expert advisor from any program inside my machine. But the problem appears when I use PUB/SUB (so applications can subscribe to ticks) sockets with REP/REQ (so applications can send messages to the MT5) sockets.

I do use EventChartCustom for publishing through the pub/sub socket (each "subscribe" to a symbol is an indicator), but the on OnCalculate from the indicator stops triggering as soon as I use the REP/REQ socket. 

So I want to divide the application in two. One with the REP/REQ socket and one with the PUB/SUB socket.

nicholish en
2685
nicholish en  
leoni loris:

I'm using a solution with ZeroMQ where I can send messages to a expert advisor from any program inside my machine. But the problem appears when I use PUB/SUB (so applications can subscribe to ticks) sockets with REP/REQ (so applications can send messages to the MT5) sockets.

I do use EventChartCustom for publishing through the pub/sub socket (each "subscribe" to a symbol is an indicator), but the on OnCalculate from the indicator stops triggering as soon as I use the REP/REQ socket. 

So I want to divide the application in two. One with the REP/REQ socket and one with the PUB/SUB socket.

https://github.com/dingmaotu/mql-zmq

leoni loris
21
leoni loris  
nicholi shen:

https://github.com/dingmaotu/mql-zmq

I'm already using this...

Please, read the question before posting random answers.

I'm trying to send messages between TWO EA's. and I'll probably use a file or global variables.