Skip to content
All library documents

Building a Feedback-Driven Trading Model with MQL5 and Python

Article MQL5 articles

Summary

The article outlines an architecture linking an MQL5 Expert Advisor to a Python service for model predictions and post-trade feedback. The EA sends market features for inference, receives a prediction, and reports trade outcomes and related execution information. A Flask backend collects these records, stores them, and periodically retrains a neural network before exporting an updated model for use by the EA. The example uses PyTorch, feature scaling, a feedback buffer, and an ONNX export path.

The document is primarily an implementation walkthrough, not a demonstrated trading strategy. It describes components and intended behavior but supplies no measured evidence that retraining improves returns or prediction quality. Live adaptation also depends on sound feature and reward definitions, reliable data handling, and evaluation controls; the article’s optimistic claims about improvement are not supported by reported out-of-sample results. The snippets should therefore be read as a prototype design rather than a validated production system.

Key ideas

  • The proposed loop sends market features to a Python service and returns model predictions to an MQL5 EA.
  • Trade outcomes are collected as feedback samples for later supervised retraining.
  • The example uses a neural network, feature scaling, and exports updated weights for ONNX inference.
  • The article describes an integration prototype but does not provide performance tests establishing that adaptation is beneficial.

Tags

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