Another question about MT5's python integration with two computers.

David _Detnator_  

I posted another similar question but maybe it's too complicated. Trying here for a related, but different/simpler question...

The MQL5 documentation on this page gives an example of a python script that can communicate with a broker, get some ticks and other data, and then operate on it -- all in python, using the MT5 python functions.  It's pretty neat.  However...

What if I need some of that code to run on a different computer -- a Mac, on which...

pip install MetaTrader5

...won't run.

So, consider a Windows PC on which we do the above step to install the python MT5.  The question is, how much, if any, of the code in the "5. Launch the test script" step on that page can be run on another computer (which happens to be a Mac) and talk to the python MT5 on the first (Windows) computer?  

For example...

Maybe with the `import` step: is there some way in python for computer #1 to import a python module from computer #2, in its code, without actually installing the module on computer #1?  Maybe it's some syntax like: 

import MetaTrader5 from 10.0.0.5 as mt5

...or anything remotely like that?  And if anything like this is possible, I'm imagining that step simply importing only the function definitions, but when the script runs and calls those functions it knows to run them on the other computer and deliver the results back to the calling computer to work with... or something like that.

Or... 

Maybe such an import is impossible, so don't do the import at all, but every time I need to use one of those `mt5...() functions`, I have to somehow call it on the other computer...?  Maybe I have a python script on computer #2 that I can call from computer #2 and on calling that script I can tell it to run a given function with given parameters and deliver the result back to me on computer #1?  Or something...?

Or... 

At the other extreme, (as discussed in my other related question) there's setting up computer #2 as some kind of server (web server? with a REST API?), or something, and I have to write (or find) a complete REST API or web server application, or something, in python to handle it all.

But that's a lot of work and complexity... I'm hoping to find a more straight forward option, if possible.




In short: what are the options for running a python script/app on one computer (a Mac) somehow talking to MT5 on another separate computer (a Windows PC)?

(Assume they're on the same LAN, with a high speed network, so that any bottlenecks should still be the communication with the broker much more than any communication required between the two computers).

I admit I have almost no idea what I'm talking about, such that I might not even be asking the right questions, so I'll welcome any direction or advice.  Feel free to point me to other documentation, or articles, or anything that might be helpful.  I'm happy to do my own research work, learning, whatever else, but at the moment I'm not even sure what I'm looking for.


Thanks!

Documentation on MQL5: Integration / MetaTrader for Python
Documentation on MQL5: Integration / MetaTrader for Python
  • www.mql5.com
MetaTrader for Python - Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
David _Detnator_  
For anyone finding this while struggling with anything similar, I finally solved this with a REST API.  More details here and here.
MT5 Python integration on Mac M1 (ARM)
MT5 Python integration on Mac M1 (ARM)
  • 2022.05.23
  • www.mql5.com
Does anyone know if there's any way to get the MT5 python integration to work on Mac M1 (arm...
Reason: