Skip to content
All library documents

Training and Serving Per-Symbol Trading Models with MQL5 and Python

Article MQL5 articles

Summary

The article describes an end-to-end workflow that connects MetaTrader 5 data collection to Python model training and live inference. Historical bars are uploaded in chunks, enriched with technical and statistical features, labeled, and stored for training. A MetaTrader Expert Advisor then sends recent prices to a Flask service and can act on returned signals. The proposed setup assigns market interaction and order execution to the EA, while Python handles feature engineering, model fitting, caching, and prediction.

It presents implementation details for the EA’s polling, JSON requests, retry controls, and chart actions, alongside a service architecture for model training and prediction. It mentions common tabular and deep learning libraries but does not provide enough visible material to assess a specific model’s predictive performance. The article is primarily an integration guide; it gives no out-of-sample trading results, and the described signals and pipeline should not be taken as evidence of profitability or robustness.

Key ideas

  • Historical bars can be transferred from MetaTrader 5 to Python in manageable chunks and persisted for later training.
  • Feature engineering can turn price data into technical and statistical inputs with labels for supervised learning.
  • A Flask API can serve per-symbol models from memory and return predictions to an Expert Advisor.
  • The EA can poll on new bars, submit recent prices, and use returned signals to guide chart actions or trading.
  • The article explains system integration but supplies no predictive or profitability evaluation.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.