Discussing the article: "Multi-Threaded Trading Robot with Machine Learning: From Concept to Implementation"

 

Check out the new article: Multi-Threaded Trading Robot with Machine Learning: From Concept to Implementation.

The article presents a step-by-step development of a multi-threaded trading robot with machine learning in Python and MetaTrader 5. The system architecture is considered – from data collection and creation of technical indicators to training XGBoost models with portfolio risk management. The implementation of data augmentation, feature clustering via Gaussian Mixture Models, and flow coordination for parallel trading of multiple currency pairs is described in detail.

This project is a revival of one of my old codes. The code has been sitting on dusty hard drives for years, and by now it no longer runs: too much has changed in the development environment. I decided not only to revive the development, but also to explain it step by step over the course of several articles.

The original idea was to develop a multi-threaded robot using powerful parallel computing, possibly even using cloud computing clusters. Imagine this: you are sitting in front of multiple monitors, watching currency pairs move, and you realize the human brain is simply not capable of simultaneously monitoring dozens of instruments, analyzing hundreds of indicators, and making decisions at the speed required by modern markets. It was at this point that the idea of creating an intelligent trading robot was born, capable of working with a portfolio of instruments and analyzing decades of data in parallel.

But why Python and not the built-in MQL5? This question probably arises in the minds of everyone who sees the hybrid architecture of our solution. The answer lies in the nature of the problems we solve. Machine learning requires powerful libraries like scikit-learn, XGBoost, and pandas — an ecosystem that seems tailor-made for such tasks.

Another reason for this choice: the architecture of our robot is built on the philosophy of division of responsibility and division of labor. Python is responsible for the "brains" - data collection, pre-processing, feature creation, model training, and trading signal generation. MetaTrader 5, through its Python API, acts as the "hands" — executing orders, managing positions, and providing real-time market data.


Author: Yevgeniy Koshtenko