MT5 - Python binding

 

Good day,

I am giving to understand that there is some MT5 - Matlab interaction possible. I'd like to ask whether there is also some option to use Python scripts with MT5.

 

Thank you. 

 
KvasCZ:

Good day,

I am giving to understand that there is some MT5 - Matlab interaction possible. I'd like to ask whether there is also some option to use Python scripts with MT5.

 

Thank you. 

There is not (yet). But I assume you could use the same method as I did for C# to bind MQL5 to IronPython (see my article https://www.mql5.com/en/articles/249).

Exposing C# code to MQL5 using unmanaged exports
  • 2011.02.09
  • investeo
  • www.mql5.com
In this article I presented different methods of interaction between MQL5 code and managed C# code. I also provided several examples on how to marshal MQL5 structures against C# and how to invoke exported DLL functions in MQL5 scripts. I believe that the provided examples may serve as a basis for future research in writing DLLs in managed code. This article also open doors for MetaTrader to use many libraries that are already implemented in C#.
 
investeo:

There is not (yet). But I assume you could use the same method as I did for C# to bind MQL5 to IronPython (see my article https://www.mql5.com/en/articles/249).

 

Thank you for answer. This way is interesting. Unfortunately, it is beyond my capability even to understand whether this way would work for Python itself.
 

Hi. For MT4 there is https://github.com/rmawatson/PyMT4 which is IMHO the right way to integrate with Python. Does anybody know if that library has been or is being ported to MT5 somewhere? Thanks!

 
morvitez:

Hi. For MT4 there is https://github.com/rmawatson/PyMT4 which is IMHO the right way to integrate with Python. Does anybody know if that library has been or is being ported to MT5 somewhere? Thanks!

Being that MT4 and MT5 both use an almost equivalent portion of MQL, I would think that this would be doable if someone who knew MQL (which basically is not me, unfortunately) and Python (again, not me) had it in their mind to try.
Reason: