Python in Enable and Disable MT5 EA

 

Hi,


Anyone had idea of how do python access to MT5 to enable or disable the EA ??


Thanks

 

There is a theoretical possibility to use user.dll like:

int main = GetAncestor(WindowHandle(_Symbol, _Period), GA_ROOT);// WindowHandle= mt4 function!!
PostMessageW(main, WM_COMMAND, ???, 0);
Sleep(2000);

But I don't know whether it works and what number must replace the three ???

 
Paulf:

Hi,


Anyone had idea of how do python access to MT5 to enable or disable the EA ??


Thanks

It's not possible, even on MQL5. All you have with python's library is here; using terminal_info() you could get EA status to organize the semantic of users actions (i.e. ask them to enable on platform).

Best regards

Documentation on MQL5: Python Integration
Documentation on MQL5: Python Integration
  • www.mql5.com
Python Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5