MetaTrader 5 Python User Group - the summary - page 36

 

Neuro-symbolic systems in algorithmic trading: Combining symbolic rules and neural networks

Neuro-symbolic systems in algorithmic trading: Combining symbolic rules and neural networks

In this article, I will explain how my team and I developed such a system in Python and show how to combine classical pattern analysis with modern machine learning methods. We will walk through the architecture, from basic components to complex decision-making mechanisms, and of course, I will share real code and test results.
Neuro-symbolic systems in algorithmic trading: Combining symbolic rules and neural networks
Neuro-symbolic systems in algorithmic trading: Combining symbolic rules and neural networks
  • 2025.09.22
  • www.mql5.com
The article describes the experience of developing a hybrid trading system that combines classical technical analysis with neural networks. The author provides a detailed analysis of the system architecture from basic pattern analysis and neural network structure to the mechanisms behind trading decisions, and shares real code and practical observations.
 

Price movement discretization methods in Python

Price movement discretization methods in Python

Every trading system developer sooner or later faces a fundamental question: how to properly slice and dice market data for analysis? The conventional fixed-interval approach is like trying to measure an athlete's heart rate every 5 minutes, whether they are sprinting or resting. During periods of high activity, critical information is lost within a single bar, while during quiet hours we get dozens of empty bars, creating information noise.

Price movement discretization methods in Python
Price movement discretization methods in Python
  • 2025.10.02
  • www.mql5.com
We will look at price discretization methods using Python + MQL5. In this article, I will share my practical experience developing a Python library that implements a wide range of approaches to bar formation — from classic Volume and Range bars to more exotic methods like Renko and Kagi. We will consider three-line breakout candles and range bars analyzing their statistics and trying to define how else the prices can be represented discretely.
 

Creating volatility forecast indicator using Python

Creating volatility forecast indicator using Python

In this article, I will share my journey from despair to a working volatility forecasting system. No boring stuff or academic jargon – just real experience and working solutions. I will show you how I combined MetaTrader 5 with Python (spoiler: they did not get along right away), how I made machine learning work for me, and what pitfalls I encountered along the way.
Creating volatility forecast indicator using Python
Creating volatility forecast indicator using Python
  • 2025.10.13
  • www.mql5.com
In this article, we will forecast future extreme volatility using binary classification. Besides, we will develop an extreme volatility forecast indicator using machine learning.
 

Implementing Practical Modules from Other Languages in MQL5 (Part 04): time, date, and datetime modules from Python

Implementing Practical Modules from Other Languages in MQL5 (Part 04): time, date, and datetime modules from Python

The MQL5 programming language has plenty of built-in functions for managing and evaluating the time, ensuring our algorithmic trading systems are aware and in touch with the time in the real world. However, our favorable programming language offers a very basic (simple) and sometimes not human-friendly way of working with time, dates, etc., compared to other languages such as Python which offers rich modules for the task such as datetime, calendar, time, zoneinfo, etc.


In this article, we are going to implement similar modules to those offered in Python for time handling in the MQL5 programming language.
datetime — Basic date and time types
datetime — Basic date and time types
  • docs.python.org
Source code: Lib/datetime.py The datetime module supplies classes for manipulating dates and times. While date and time arithmetic is supported, the focus of the implementation is on efficient attr...
 

Implementing Practical Modules from Other Languages in MQL5 (Part 05): The Logging module from Python, Log Like a Pro

Implementing Practical Modules from Other Languages in MQL5 (Part 05): The Logging module from Python, Log Like a Pro

Logging is very crucial in any modern device, program, or software. It is simply the process of keeping records of everything that has happened in the lifetime of a particular operation.

  • Computers keep records of software usage, connections, and system events.
  • Our browsers keep the history of the sites we visit and how we interact with them.

Keeping these records is essential for many important reasons, including troubleshooting, debugging, auditing, monitoring performance, and understanding the behavior of our systems over time.

Implementing Practical Modules from Other Languages in MQL5 (Part 05): The Logging module from Python, Log Like a Pro
Implementing Practical Modules from Other Languages in MQL5 (Part 05): The Logging module from Python, Log Like a Pro
  • 2025.12.04
  • www.mql5.com
Integrating Python's logging module with MQL5 empowers traders with a systematic logging approach, simplifying the process of monitoring, debugging, and documenting trading activities. This article explains the adaptation process, offering traders a powerful tool for maintaining clarity and organization in trading software development.
 

Data Science and ML (Part 47): Forecasting the Market Using the DeepAR model in Python

Data Science and ML (Part 47): Forecasting the Market Using the DeepAR model in Python

Time series forecasting has never been an easy task in machine learning; several techniques and models have been introduced to tackle this problem, most without definitive success. Linear and non-linear models are often not capable of this task either, despite showing glimpses of decent predictions of time series data.

Data Science and ML (Part 47): Forecasting the Market Using the DeepAR model in Python
Data Science and ML (Part 47): Forecasting the Market Using the DeepAR model in Python
  • 2026.01.08
  • www.mql5.com
In this article, we will attempt to predict the market with a decent model for time series forecasting named DeepAR. A model that is a combination of deep neural networks and autoregressive properties found in models like ARIMA and Vector Autoregressive (VAR).
 

Implementing Practical Modules from Other Languages in MQL5 (Part 06): Python-Like File IO operations in MQL5 

Implementing Practical Modules from Other Languages in MQL5 (Part 06): Python-Like File IO operations in MQL5

File operations are essential for any programming language. They help our programs interact with external files through code, helping us import and export bits of information. With hundreds, if not thousands, of file types available in modern software, we need better and more effective ways of handling (reading and writing) information to and from these files.

Implementing Practical Modules from Other Languages in MQL5 (Part 06): Python-Like File IO operations in MQL5
Implementing Practical Modules from Other Languages in MQL5 (Part 06): Python-Like File IO operations in MQL5
  • 2026.01.09
  • www.mql5.com
This article shows how to simplify complex MQL5 file operations by building a Python-style interface for effortless reading and writing. It explains how to recreate Python’s intuitive file-handling patterns through custom functions and classes. The result is a cleaner, more reliable approach to MQL5 file I/O.
 

Python-MetaTrader 5 Strategy Tester (Part 02): Dealing with Bars, Ticks, and Overloading Built-in Functions in a Simulator

Python-MetaTrader 5 Strategy Tester (Part 02): Dealing with Bars, Ticks, and Overloading Built-in Functions in a Simulator

In the previous article, we discussed and made a simulator class in Python called TradeSimulator, which relied heavily on information from MetaTrader 5, such as ticks, bar data, symbol information, and much more.

The first article laid the foundation for what's required in imitating the MetaTrader 5 client, and its strategy tester (simulator). In this article, we will introduce ticks and bars data, as well as functions similar to those provided by the Python-MetaTrader 5 module in the simulator, taking a step closer to replicating everything that MetaTrader 5 does and provides.

Python-MetaTrader 5 Strategy Tester (Part 02): Dealing with Bars, Ticks, and Overloading Built-in Functions in a Simulator
Python-MetaTrader 5 Strategy Tester (Part 02): Dealing with Bars, Ticks, and Overloading Built-in Functions in a Simulator
  • 2026.01.16
  • www.mql5.com
In this article, we introduce functions similar to those provided by the Python-MetaTrader 5 module, providing a simulator with a familiar interface and a custom way of handling bars and ticks internally.
 

Python-MetaTrader 5 Strategy Tester (Part 03): MT5-Like Trading Operations — Handling and Managing

In the previous article, we implemented similar syntax and functions to those offered by the Python-MetaTrader module in our simulator. With similar orders, deals, positions, and structures. In this post, we will implement a very close to MetaTrader 5 approach of handling such structures (trading operations). 
Python-MetaTrader 5 Strategy Tester (Part 03): MT5-Like Trading Operations — Handling and Managing
Python-MetaTrader 5 Strategy Tester (Part 03): MT5-Like Trading Operations — Handling and Managing
  • 2026.01.20
  • www.mql5.com
In this article we introduce Python-MetaTrader5-like ways of handling trading operations such as opening, closing, and modifying orders in the simulator. To ensure the simulation behaves like MT5, a strict validation layer for trade requests is implemented, taking into account symbol trading parameters and typical brokerage restrictions.
 

Build a Remote Forex Risk Management System in Python

Build a Remote Forex Risk Management System in Python

Our remote risk manager is not just a tool, it is your insurance against financial chaos in the unpredictable world of Forex trading. Are you ready to turn your trading from a risky gamble into a controlled process? Then buckle up — we're going on a journey through the world of smart risk management, where technology meets financial security.
Build a Remote Forex Risk Management System in Python
Build a Remote Forex Risk Management System in Python
  • 2026.01.21
  • www.mql5.com
We are making a remote professional risk manager for Forex in Python, deploying it on the server step by step. In the course of the article, we will understand how to programmatically manage Forex risks, and how not to waste a Forex deposit any more.