MetaTrader 5 Python User Group - the summary - page 37

 

Python-MetaTrader 5 Strategy Tester (Part 04): Tester 101

Python-MetaTrader 5 Strategy Tester (Part 04): Tester 101

In previous articles of this series, we laid the groundwork for building a MetaTrader 5–like strategy tester from scratch. With the core structure in place, several critical components are still missing in our project.

To this stage, we are yet to process ticks and bars sequentially, we lack mechanisms for monitoring open orders and the simulated trading account, and we do not have performance metrics such as profit and loss, drawdown, win rate, risk–reward ratios, and detailed trade statistics in the simulator.

Python-MetaTrader 5 Strategy Tester (Part 04): Tester 101
Python-MetaTrader 5 Strategy Tester (Part 04): Tester 101
  • 2026.01.23
  • www.mql5.com
In this fascinating article, we build our very first trading robot in the simulator and run a strategy testing action that resembles how the MetaTrader 5 strategy tester works, then compare the outcome produced in a custom simulation against our favorite terminal.
 

Python-MetaTrader 5 Strategy Tester (Part 05): Multi-Symbols and Timeframes Strategy Tester

Python-MetaTrader 5 Strategy Tester (Part 05): Multi-Symbols and Timeframes Strategy Tester

In the previous article, we were able to utilize real ticks, generated ticks, and bars obtained from the MetaTrader 5 terminal in our custom strategy tester. Despite ending up with a first successful strategy tester action, we are yet to fully handle and process data across various instruments and timeframes (something the MetaTrader 5  strategy tester does really well).
Python-MetaTrader 5 Strategy Tester (Part 05): Multi-Symbols and Timeframes Strategy Tester
Python-MetaTrader 5 Strategy Tester (Part 05): Multi-Symbols and Timeframes Strategy Tester
  • 2026.02.10
  • www.mql5.com
This article presents a MetaTrader 5–compatible backtesting workflow that scales across symbols and timeframes. We use HistoryManager to parallelize data collection, synchronize bars and ticks from all timeframes, and run symbol‑isolated OnTick handlers in threads. You will learn how modelling modes affect speed/accuracy, when to rely on terminal data, how to reduce I/O with event‑driven updates, and how to assemble a complete multicurrency trading robot.
 

Quantitative Analysis of Trends: Collecting Statistics in Python

Quantitative Analysis of Trends: Collecting Statistics in Python

Quantitative trend analysis is an approach that transforms chaotic market movements into an orderly system of numbers and patterns. In a world where most traders rely on intuition and visual assessment of charts, mathematical analysis of trend movements provides an undeniable advantage. Instead of subjective feelings, you receive precise data: the average trend duration in days, its typical value in points, and characteristic patterns of development and completion.

It is this objectivity that makes quantitative analysis the cornerstone of professional trading. William Eckhardt, a famous trader, rightly noted that trading is not a field of psychology, but a field of statistics. When you know that uptrends on the EURUSD pair statistically last longer than downtrends, or that 70% of trends on GBPUSD end before reaching 200 points, this is not just information, but a specific guide to action.

Quantitative Analysis of Trends: Collecting Statistics in Python
Quantitative Analysis of Trends: Collecting Statistics in Python
  • 2026.02.16
  • www.mql5.com
What is quantitative trend analysis in the Forex market? We collect statistics on trends, their magnitude and distribution across the EURUSD currency pair. How quantitative trend analysis can help you create a profitable trading expert advisor.
 

CFTC Data Mining in Python and Building an AI Model

CFTC Data Mining in Python and Building an AI Model

The proposed approach combines COT/TFF data and market quotes into a single Python model with automated trading via MetaTrader 5. This allows us to move from analysis to action without delays and human intervention.

CFTC Data Mining in Python and Building an AI Model
CFTC Data Mining in Python and Building an AI Model
  • 2026.05.04
  • www.mql5.com
Let's try mining CFTC data, downloading COT and TFF reports via Python, connecting all this with MetaTrader 5 quotes and an AI model, and get forecasts. What are COT reports in the Forex market? How to use COT and TFF reports for forecasting?
 

Python + MetaTrader 5: Fast Research Framework for Data, Features, and Prototypes

Python + MetaTrader 5: Fast Research Framework for Data, Features, and Prototypes

In this article, we will show:

  • how Python is integrated with MetaTrader 5;
  • how to use it to analyze financial data and test hypotheses;
  • how to build and train a small model and then transfer the trained result to an EA using ONNX.

This will allow us to move from a research experiment to practical implementation in a trading system.

Python + MetaTrader 5: Fast Research Framework for Data, Features, and Prototypes
Python + MetaTrader 5: Fast Research Framework for Data, Features, and Prototypes
  • 2026.05.04
  • www.mql5.com
The article demonstrates how Python and MetaTrader 5 integration combines research flexibility and trade execution into a single workflow. Python is used for data analysis, feature selection and model training, while MetaTrader 5 is used for testing and trading automation. This approach simplifies the transfer of solutions into practice, increases reproducibility, and makes the development of trading systems faster and more structured.
 

Beyond the Clock (Part 1): Building Activity and Imbalance Bars in Python and MQL5

Beyond the Clock (Part 1): Building Activity and Imbalance Bars in Python and MQL5

Four production problems in the pipeline are addressed explicitly: loading multi-year tick data without exceeding memory (partitioned Parquet storage read via Dask), cleaning broker-feed artifacts that corrupt bar construction (zero spreads, duplicate timestamps, NaT indices), calibrating the adaptive threshold for imbalance bars automatically so the first bar does not bias the EWM history, and persisting the EWM tracker across EA restarts so the threshold does not reset mid-session. A short parity test at the end verifies that the two implementations, fed the same tick stream, produce identical bars.
Beyond the Clock (Part 1): Building Activity and Imbalance Bars in Python and MQL5
Beyond the Clock (Part 1): Building Activity and Imbalance Bars in Python and MQL5
  • 2026.05.08
  • www.mql5.com
The article replaces clock-based sampling with López de Prado's alternative bar types and provides two aligned implementations: a unified Python module for batch tick histories and an object‑oriented MQL5 library for live EAs. It covers Parquet/Dask infrastructure, data cleaning, and a single API. Practical issues are solved explicitly: zero‑tick time‑bar filtering, imbalance threshold initialization, EWM state persistence, and parity between Python and MQL5 outputs.