Python Development Environment / Jack's Technology Stack


Staff member
Could you detail the advantages to using Python over MQL.
(sorry for the late reply, I didn't see your message for some reason.)

With anything, there's trade-offs.

When using Python, you gain access to every library available to python to use with your project. Want a web interface? Done.. want a GUI for custom controls? Done... want to use the most widely supported and accessible machine learning libraries and tools? Done... want to integrate 3rd party data into your trade decisions? Easily done!..

The drawback is, should your broker not already provide a Restful API or Python native API, you'll likely have to write some sort of bridge code yourself (such as the agents I describe to connect to MT5.) It's a bit clunky, and it takes a little effort, but it works.

Other benefits include writing code once that will be easily ported to new platforms. If you do something advanced in MT5 (such as using machine learning,) it's gonna be a real pain to port it outside of MT5 later on should you ever use a different broker who doesn't support MT5. For instance, many decent traders "grow up" to using a broker like Interactive Brokers, who doesn't offer MT4/5 at all (and before anyone tries to link to some 3rd party tool or bridge service.. they are horrendous for use with Interactive Brokers.)

Or say you want to get into futures with existing strategies you have running in MT5... that limits yourself to maybe 1 major broker and FCM out there and their offering, while fine, is limited. Having your code written in a language that's generic and only requiring you to connect the dots to a new broker's API means it's a lot easier to port to one of many decent futures brokers should you ever want to make this switch.

You can build in some fault tolerance... setup a heartbeat monitor on your primary instance and have some sort of risk and order manager kick in should your main machine go down... MT5 doesn't do anything like this.

Finally... another big advantage I noticed was running 'light'... often I can run dedicated python code on a micro server (without a graphical interface) in Amazon's cloud... you might run a total bill of $2-3 bucks a month to power multiple strategies... You simply need a beefier machine if you're gonna run MT5 and a graphical interface, typically costing 10x as much.

Between all the 3rd party libraries available for python, and all the nifty setups you can do, it really comes down to flexibility.