Trigger EA or Script on Account2 from EA on Account1

 

Hi all,

I have a requirement where I need to run an EA on Account1 which does various tasks. At certain points the EA on Account1 needs to trigger actions on Account2. After looking around a little bit, it seems like:

- I will need to run the code for each account separately in different terminals?

- I will need to run an EA on Account1 but not sure about Account2, can I just trigger scripts remotely or better to just run an EA on Account2 (specifically, Account2 will be hedging, so it only needs to react to events in Account1, i.e. put on or remove hedges when positions in Account1 are updated)?

- It seems obvious I will need to communicate between the two but pretty fuzzy on what my options are. Seems like global variables and custom events won't work (since I would assume those will only work within the same account/terminal). Should I use named pipes? any other ideas?

Thanks all in advance

 

Search the CodeBase for examples of Trade Copying. That will give some ideas of how to communicate between EAs on separate terminals.


Reason: