MetaTrader 5 Python User Group - the summary - page 35

 

Price Action Analysis Toolkit Development (Part 31): Python Candlestick Recognition Engine (I) — Manual Detection

Price Action Analysis Toolkit Development (Part 31): Python Candlestick Recognition Engine (I) — Manual Detection

Candlestick charts are a fundamental tool used by financial analysts and traders to visualize and interpret price movements over time. Originating from Japanese rice merchants centuries ago, these charts have evolved into a vital component of technical analysis across various financial markets, including stocks, forex, and futures.
 
Price Action Analysis Toolkit Development (Part 31): Python Candlestick Recognition Engine (I) — Manual Detection
Price Action Analysis Toolkit Development (Part 31): Python Candlestick Recognition Engine (I) — Manual Detection
  • 2025.07.14
  • www.mql5.com
Candlestick patterns are fundamental to price-action trading, offering valuable insights into potential market reversals or continuations. Envision a reliable tool that continuously monitors each new price bar, identifies key formations such as engulfing patterns, hammers, dojis, and stars, and promptly notifies you when a significant trading setup is detected. This is precisely the functionality we have developed. Whether you are new to trading or an experienced professional, this system provides real-time alerts for candlestick patterns, enabling you to focus on executing trades with greater confidence and efficiency. Continue reading to learn how it operates and how it can enhance your trading strategy.
 

Implementing Practical Modules from Other Languages in MQL5 (Part 02): Building the REQUESTS Library, Inspired by Python

Implementing Practical Modules from Other Languages in MQL5 (Part 02): Building the REQUESTS Library, Inspired by Python

An ability to send HTTP requests to the web directly from MetaTrader 5 is one of the best things that's ever happened to the MQL5 programming language. With this ability, traders can communicate with their external websites, servers, trading apps, etc.

Implementing Practical Modules from Other Languages in MQL5 (Part 02): Building the REQUESTS Library, Inspired by Python
Implementing Practical Modules from Other Languages in MQL5 (Part 02): Building the REQUESTS Library, Inspired by Python
  • 2025.07.17
  • www.mql5.com
In this article, we implement a module similar to requests offered in Python to make it easier to send and receive web requests in MetaTrader 5 using MQL5.
 

Forum on trading, automated trading systems and testing trading strategies

Market Condition Evaluation based on standard indicators in Metatrader 5

Sergey Golubev, 2025.07.19 03:58

Price Action Analysis Toolkit Development (Part 32): Python Candlestick Recognition Engine (II) — Detection Using Ta-Lib

Price Action Analysis Toolkit Development (Part 32): Python Candlestick Recognition Engine (II) — Detection Using Ta-Lib

In my previous article, I introduced the use of Python for candlestick pattern detection. We began by employing manual detection techniques, where each candlestick pattern was coded explicitly. In this approach, whenever MQL5 sends data to Python—including open, close, high, low, and timestamp—Python processes this information to identify the pattern through calculations.

 

Data Science and ML (Part 46): Stock Markets Forecasting Using N-BEATS in Python

Data Science and ML (Part 46): Stock Markets Forecasting Using N-BEATS in Python

N-BEATS (Neural Basis Expansion Analysis for Time Series) is a deep learning model specifically designed for time series forecasting. It provides a flexible framework for univariate and multivariate forecasting tasks.

It was introduced by researchers at Element AI (now part of ServiceNow) in 2019, with the paper N-BEATS: Neural basis expansion analysis for interpretable time series forecasting.

Developers at Element AI developed this model to challenge the dominance of classical statistical models like ARIMA and ETS in time series, while compromising the capabilities offered by classical machine learning models.

Data Science and ML (Part 46): Stock Markets Forecasting Using N-BEATS in Python
Data Science and ML (Part 46): Stock Markets Forecasting Using N-BEATS in Python
  • 2025.07.21
  • www.mql5.com
N-BEATS is a revolutionary deep learning model designed for time series forecasting. It was released to surpass classical models for time series forecasting such as ARIMA, PROPHET, VAR, etc. In this article, we are going to discuss this model and use it in predicting the stock market.
 

MetaTrader tick info access from MetaTrader services to python application using sockets

MetaTrader tick info access from MetaTrader services to python application using sockets

Sometimes everything is not programmable in the MQL5 language. And even if it is possible to convert existing advanced libraries in MQL5, it would be time-consuming. A better option is to integrate or utilize the existing libraries to achieve a task. For example, there are numerous machine-learning-libraries in python. It's not the best option for us to create identical copies in MQL5 form just to achieve a machine learning task for trading. It is better to export the data needed for that python machine learning library, do the necessary process in the python environment and import the result back into the MQL5 program. This article is about transporting such data from the MetaTrader terminal to the python environment.
MetaTrader tick info access from MetaTrader services to python application using sockets
MetaTrader tick info access from MetaTrader services to python application using sockets
  • 2025.07.28
  • www.mql5.com
Sometimes everything is not programmable in the MQL5 language. And even if it is possible to convert existing advanced libraries in MQL5, it would be time-consuming. This article tries to show that we can bypass Windows OS dependency by transporting tick information such as bid, ask and time with MetaTrader services to a python application using sockets.
 
Price Action Analysis Toolkit Development (Part 35): Training and Deploying Predictive Models
Price Action Analysis Toolkit Development (Part 35): Training and Deploying Predictive Models
  • 2025.08.04
  • www.mql5.com
Historical data is far from “trash”—it’s the foundation of any robust market analysis. In this article, we’ll take you step‑by‑step from collecting that history to using it to train a predictive model, and finally deploying that model for live price forecasts. Read on to learn how!
 

Python-MetaTrader 5 Strategy Tester (Part 01): Trade Simulator

Python-MetaTrader 5 Strategy Tester (Part 01): Trade Simulator

The MetaTrader5-Python package is a beneficial module that enables Python developers to develop their trading applications for the MetaTrader 5 platform. It grants developers access to the trading platform for receiving data, sending, and monitoring trades.

This module revolutionized the way we think of the MetaTrader 5 desktop application, it is not a one-dimensional app restricted to its native programming language for building trading robots known as MQL5. This trading application is flexible enough and capable of receiving trade commands from an external programming language apart from MQL5.

Python-MetaTrader 5 Strategy Tester (Part 01): Trade Simulator
Python-MetaTrader 5 Strategy Tester (Part 01): Trade Simulator
  • 2025.08.08
  • www.mql5.com
The MetaTrader 5 module offered in Python provides a convenient way of opening trades in the MetaTrader 5 app using Python, but it has a huge problem, it doesn't have the strategy tester capability present in the MetaTrader 5 app, In this article series, we will build a framework for back testing your trading strategies in Python environments.
 

Price Action Analysis Toolkit Development (Part 36): Unlocking Direct Python Access to MetaTrader 5 Market Streams

Price Action Analysis Toolkit Development (Part 36): Unlocking Direct Python Access to MetaTrader 5 Market Streams

Our previous article demonstrated how a straightforward MQL5 script could transfer historical bars into Python, engineer features, train a machine learning model, and then send signals back to MetaTrader for execution—eliminating manual CSV exports, Excel-based analysis, and version control issues. Traders gained an end-to-end pipeline that transformed raw minute-bar data into statistically driven entry points, complete with dynamically calculated stop-loss (SL) and take-profit (TP) levels.
Price Action Analysis Toolkit Development (Part 36): Unlocking Direct Python Access to MetaTrader 5 Market Streams
Price Action Analysis Toolkit Development (Part 36): Unlocking Direct Python Access to MetaTrader 5 Market Streams
  • 2025.08.14
  • www.mql5.com
Harness the full potential of your MetaTrader 5 terminal by leveraging Python’s data-science ecosystem and the official MetaTrader 5 client library. This article demonstrates how to authenticate and stream live tick and minute-bar data directly into Parquet storage, apply sophisticated feature engineering with Ta and Prophet, and train a time-aware Gradient Boosting model. We then deploy a lightweight Flask service to serve trade signals in real time. Whether you’re building a hybrid quant framework or enhancing your EA with machine learning, you’ll walk away with a robust, end-to-end pipeline for data-driven algorithmic trading.
 

Multi-module trading robot in Python and MQL5 (Part I): Creating basic architecture and first modules

Multi-module trading robot in Python and MQL5 (Part I): Creating basic architecture and first modules

Do you know what's most interesting? This system really works in the market. It is not just a textbook example, but an actual trading tool. Of course, we will start with the basic version, but even that is impressive. We have a great journey ahead of us. We will create a system capable of learning and adapting. We will improve it step by step. For now, let's start with the most important thing - building a solid foundation.
Multi-module trading robot in Python and MQL5 (Part I): Creating basic architecture and first modules
Multi-module trading robot in Python and MQL5 (Part I): Creating basic architecture and first modules
  • 2025.08.28
  • www.mql5.com
We are going to develop a modular trading system that combines Python for data analysis with MQL5 for trade execution. Four independent modules monitor different market aspects in parallel: volumes, arbitrage, economics and risks, and use RandomForest with 400 trees for analysis. Particular emphasis is placed on risk management, since even the most advanced trading algorithms are useless without proper risk management.
 

Quantum computing and trading: A fresh approach to price forecasts

Quantum computing and trading: A fresh approach to price forecasts

Imagine a world where every market transaction is analyzed through the lens of possibilities that exist simultaneously — like famous Schrödinger's cat who is both alive and dead until we open the box. This is how quantum trading works: it looks at all potential market states at once, opening up new horizons for financial analysis.
Quantum computing and trading: A fresh approach to price forecasts
Quantum computing and trading: A fresh approach to price forecasts
  • 2025.09.17
  • www.mql5.com
The article describes an innovative approach to forecasting price movements in financial markets using quantum computing. The main focus is on the application of the Quantum Phase Estimation (QPE) algorithm to find prototypes of price patterns allowing traders to significantly speed up the market data analysis.