Custom Event: Call from EA1 to EA2 - page 2

 
Mladen Rakic:
Sorry, but what difference does the 1 to nnn ms make?

You are using mql for start - not low level parallel computing on Cray® XC50™. If you are trying to HFT then you shall have to migrate to something completely different (starting from replacing your computer with a COMPUTER and the place you work for an office that is 100 feet from your broker and, in the end, replacing the platform and coding environment used ...). Otherwise, the difference means completely nothing in real time mt usage and trading
Of course I am working from a computer which has a fibre cross-connect to the broker (latency around 0.4ms). What I am doing is not about HFT and in most cases 15.6ms will not make a difference, however in some cases this time will make a difference.
 

The code that should be executed in this example would be inside the OnChartEvent() function of the EA which will be executed if:

if(id == CHARTEVENT_CUSTOM + EVENT_ID)

So I need a way to create an event inside the external program and broadcast it to MT4.

Does anybody know how to do this using WinAPI functions? 

Reason: