Hi Dominik,
Thanks for your response. I apologize I didn't reply sooner. Soon after posting this question something came up and I had to pause. I'm back now.
Regarding Performance:
> Having such a long pipe between your decision logic and the execution on the brokers server will introduce lots of possible error sources.
In any setup, the biggest bottleneck is between the MT5 computer and the broker (ie. connected over the internet/WAN), isn't it? So if the client running the decision logic etc. has another computer on the same LAN that it's going through before getting to the broker, the communication between the two LAN computers is still going to be tens or hundreds of times faster than the connection to the broker... is that extra step really going to make any significant difference (compared with a more typical single PC setup)?
(Also, another option occurred to me, although I think it's lengthy enough that it warrants another post, so I'll ask that separately).
Thanks!
And this time somehow I just missed that you replied again altogether, until now. Not sure how that happened, as I was checking this page for a couple of weeks after my previous reply. I must have had it cached or something? Weird. Apologies again for (this time a much longer) delay!
Needless to say, thanks again for your explanations. I've asked this and similar questions in multiple places and received an intriguing array of answers, but the most viable one has repeatedly come down to the same suggestion -- python based REST API server to call the mt5... functions and return the responses to whatever calls them.
With the help of someone who's written a few other python based REST API's using Flask, I've built one now and it seems to be working really well. It actually turned out very simple, not needing much design, just a simple, single endpoint that receives a POST request with a small json data object, for example: `{functionName: "login", args: {login: 1234567, password "asdfasdf", server: "SomeBrokerInc - Demo"} }`. And then uses `fn = getattr(mt5, functionName)` and `result = fn(**args)` to get the result, which it then returns. I'm still testing and refining it but so far so good.
On performance: Admittedly, I splashed out on the fastest M1 Max Mac currently available, and a high end near new core i9 PC, for some other work projects but running this on those is certainly helping with performance of course. As you said, gives "enough performance", at least so far.
So... Good outcome I think. Thanks again. Much appreciated!
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all.
It is my understanding (please correct me if I'm wrong) that I can follow the instructions here to build the equivalent of an EA in python instead of MQL5, calling the python functions on that documentation page to handle all the broker interaction, and all the other logic and calculations and whatever else can be in my Python code.
Assuming I've understood that correctly, I want to extend that in the following way.
So, two questions:
Has anyone done any of this kind of thing? Can anyone advise if it's reasonable and how I should approach this?
Thanks!