Is it possible to receive event callbacks from Python integration?

 

Hello everyone,


I was wondering if its possible to receive some of this events from Python code using the Python Integration. I've searched in the docs but found no clue of how to do it...

In the case of not being possible, is there any way to redirect MQL5 events to trigger Python code? If so, how?

Or maybe there is a pip library that I can install that does just that...


I'm pretty new to this platform and still have a lot to learn!

I apreciate a lot your help :)

Documentation on MQL5: Event Handling
Documentation on MQL5: Event Handling
  • www.mql5.com
The MQL5 language provides handling of certain predefined events. The functions for handling these events should be defined in an MQL5 program: function name, return type, a set of parameters (if any) and their types should strictly correspond to the description of an event handling function. The client terminal event handler uses the return...
 
Yes. You can create a generator to poll the server or you can use sockets to send messages from the EA event handlers to a python asyncio server. The later will have less CPU overhead since it will sit idle until it receives a message. 
 
nicholish en:
Yes. You can create a generator to poll the server or you can use sockets to send messages from the EA event handlers to a python asyncio server. The later will have less CPU overhead since it will sit idle until it receives a message. 
Thanks, I will try with the second approach :)
Reason: