MetaQuotes / Publications
Codes
Examples from the book "Neural networks for algorithmic trading with MQL5" for MetaTrader 5
The book "Neural networks in algorithmic trading with MQL5" is a comprehensive guide, covering both the theoretical foundations of artificial intelligence and neural networks and practical aspects of their application in financial trading using the MQL5 programming language
MQL5 Programming for Traders – Source Codes from the Book. Part 7 for MetaTrader 5
The final seventh part of the book discusses the advanced capabilities of the MQL5 API, which will be useful when developing programs for MetaTrader 5. These include custom financial symbols, built-in economic calendar events, and general-purpose technologies such as networking, databases, and
MQL5 Programming for Traders – Source Codes from the Book. Part 6 for MetaTrader 5
In Part 6 of the "MQL5 Programming for Traders", we will study a key component of the MQL5 language – trading automation. We will start with a description of the fundamental entities, such as financial instrument specifications and trading account settings. These are prerequisites for creating
MQL5 Programming for Traders – Source Codes from the Book. Part 5 for MetaTrader 5
In Part 5 of the book, we'll delve deeper into the APIs associated with algorithmic trading, including financial data analysis and processing, chart visualization, automation, and user interactions
MQL5 Programming for Traders – Source Codes from the Book. Part 4 for MetaTrader 5
In the fourth part of the book, we will focus on mastering built-in functions (MQL5 API) and will gradually delve into specialized subsystems. Any MQL5 program can utilize a plethora of technologies and functionalities. Therefore, it makes sense to begin with the most simple and useful functions
MQL5 Programming for Traders – Source Codes from the Book. Part 3 for MetaTrader 5
Part 3 "Object Oriented Programming in MQL5" offers an immersion into the world of object-oriented programming (OOP) in the MQL5 language. Software development often involves the complexity related to the management of multiple entities, requiring advanced technology to improve programming
MQL5 Programming for Traders – Source Codes from the Book. Part 2 for MetaTrader 5
Part 2 "MQL5 programming fundamentals" is an introduction to the key concepts of this programming language. This part of the book is devoted to data types, identifiers, variables, expressions, and operators. You will learn how to combine different instructions to form the program logic
MQL5 Programming for Traders – Source Codes from the Book. Part 1 for MetaTrader 5
The first chapter of the book introduces the MQL5 language and development environment. One of the new features introduced in the MQL5 language compared to MQL4 (MetaTrader 4 language) is support for object-oriented programming (OOP), which makes it similar to C++
Zigzag R for MetaTrader 4
An optimized version of the Zigzag indicator, which was included in the MT4 delivery of 2005 (and in MT3.83)
RegularExpressions in MQL4 for working with regular expressions for MetaTrader 4
Regular expressions provide a formal language for quick and flexible processing of texts. Each regular expression is a pattern (mask), for which the regular expression engine tries to find matches in the source text. A pattern consists of one or more character literals, operators, or constructs
Articles
How We Built the Most Powerful Machine Learning-Powered Trading Platform: The Evolution of MQL and MetaTrader Through Archives, Forums, and Releases for MetaTrader 5
A technical history of MQL evolution: from the limited MQL and MQL II languages, through procedural MQL4, to object-oriented MQL5 with native compilation, rich APIs, and a full-fledged engineering environment. We show here the key capabilities of the language and its integrations with Python
AI Trading Platform: Why MetaTrader 5 Is the Best Choice for Algorithmic Trading with Python, ONNX, and AI Assistant for MetaTrader 5
MetaTrader 5 is well suited for AI trading because it combines market data, MQL5 development, Python research, ONNX models, Strategy Tester, VPS, and the MQL5.community ecosystem into a single workflow. This article demonstrates a practical path from AI prompts to structured signals, working with
Publish Your Article Code to MQL5 Algo Forge in 10 Minutes: A Step-by-Step Guide for MetaTrader 5
The article provides a step-by-step guide on how to migrate code from a published project into a fully-fledged MQL5 Algo Forge project. You will set up the environment and authentication in MetaEditor, create a project in Shared Projects, select the type, arrange the files, add README.md, check the
3D Visualization Without External Libraries: How MetaTrader 5 Reveals Optimization Results via MQL5 + DX11 for MetaTrader 5
The article describes the practical application of DirectX 11 and built-in MQL5 tools for creating 3D visualizations and interactive interfaces in MetaTrader 5. The focus is on cognitive efficiency - the ability of 3D charts and guided scenes to help in understanding optimization data, liquidity
From "Best Pass" to Robust Solutions: Exploring the Optimization Surface in MetaTrader 5 for MetaTrader 5
The article examines an engineering approach to optimizing an Expert Advisor in MetaTrader 5: from collecting custom metrics through Optimization Frames to parameter surface analysis. A simple event-driven EMA/RSI model demonstrates CSV export, smoothing, and local stability assessment in Python
MetaTrader 5: Build a Market to Suit Your Strategy — Renko/Range/Volume, Synthetics, and Stress Tests on Custom Symbols for MetaTrader 5
In this article, we demonstrate how to use API of the MetaTrader 5 custom symbols to transform your terminal into a data constructor for generating timeless Renko, Range, and Equal-Volume charts and assembling synthetic instruments. We will analyze tick aggregation and history modification for
The Power of MetaTrader 5: From Step-by-Step Debugging to EX5 Protection in a Unified Environment for MetaTrader 5
This article examines a comprehensive approach to developing trading algorithms: from project setup and logic debugging to protecting the finished product. We will explore MetaEditor's built-in tools, including step-by-step debugging using real ticks, performance profiling, and direct integration
From Matrices to Models: How to Build an ML Pipeline in MQL5 and Export It to ONNX for MetaTrader 5
The article describes the arrangement of a coordinated ML pipeline in MetaTrader 5 with separation of roles: Python trains and exports the model to ONNX, MQL5 reproduces normalization and PCA via matrix/vector and performs inference. This approach makes the model's inputs stable and verifiable, and
Event-Driven Architecture in MQL5: How to Turn an Expert Advisor into a Full-Fledged Trading System for MetaTrader 5
The article is dedicated to the event-driven architecture in MQL5 and describes the transition from the monolithic OnTick model to distributed processing. We will consider predefined and custom events, services and messaging between programs, as well as common architectural errors. A practical
MetaTrader 5 and the MQL5 Economic Calendar: How to Turn News into a Reproducible Trading System for MetaTrader 5
The article presents a systematic approach to news trading in MetaTrader 5 using the built-in economic calendar: data structure, API functions, time synchronization rules, and event filtering. Methods of caching and incremental updating without overloading the server are described. The article also
Forum
Discussing the article: "Creating a Cairo-Inspired Graphics Library for MetaTrader 5 (Part 6): Curves and Adaptive Flattening"
Check out the new article: Creating a Cairo-Inspired Graphics Library for MetaTrader 5 (Part 6): Curves and Adaptive Flattening . This part introduces cubic Bézier curves and a quadratic verb, flattened on append by recursive midpoint splitting (De Casteljau). A conservative flatness test sums
Discussing the article: "Implementing Session Volume Profile in MQL5"
Check out the new article: Implementing Session Volume Profile in MQL5 . Build a responsive session volume profile indicator in MQL5 from tick data with draggable session bounds and dual anchoring. The article details hash-based bucket aggregation for historical and live ticks, a timer-driven
Discussing the article: "Numerical Fidelity Under Fire: Benchmarking Native MQL5, ONNX Runtime, and ALGLIB"
Check out the new article: Numerical Fidelity Under Fire: Benchmarking Native MQL5, ONNX Runtime, and ALGLIB . This article benchmarks one MLP forward pass implemented three ways in MQL5: native code, ALGLIB, and ONNX Runtime. We quantify numerical fidelity versus a float64 ground truth and
Discussing the article: "Automating Chart Patterns in MQL5 (Part 3): The Head and Shoulders and Inverse Head and Shoulders"
Check out the new article: Automating Chart Patterns in MQL5 (Part 3): The Head and Shoulders and Inverse Head and Shoulders . The article implements a deterministic MQL5 detector for head and shoulders and its inverse, validating structure from swing labels (HH, LH, HL, LL) rather than raw peak
Discussing the article: "Building A Candlestick Trend Constraint Model (Part 11): Revealing Lower-Timeframe Triggers Within Higher-Timeframe Candle Relationships"
Check out the new article: Building A Candlestick Trend Constraint Model (Part 11): Revealing Lower-Timeframe Triggers Within Higher-Timeframe Candle Relationships . This article develops an A-B-C-D candlestick constraint model for MetaTrader 5. Candles A and B establish a completed D1 relationship
Discussing the article: "Offline Reinforcement Learning in MQL5: Conservative Q-Learning from Historical Trade Logs Without Live Exploration"
Check out the new article: Offline Reinforcement Learning in MQL5: Conservative Q-Learning from Historical Trade Logs Without Live Exploration . Build and deploy a conservative, offline‑trained policy entirely in MQL5. Logged trades become a fixed dataset for a two‑layer Q‑network trained with
Discussing the article: "Building a Prop Firm Compliance Monitor in MQL5 (Part 3): Daily Drawdown, Overall Drawdown, and Profit Targets"
Check out the new article: Building a Prop Firm Compliance Monitor in MQL5 (Part 3): Daily Drawdown, Overall Drawdown, and Profit Targets . This part turns stored account references into a financial monitoring engine for MetaTrader 5. It calculates daily drawdown from the confirmed session balance
Discussing the article: "How to Implement Metaprompting for Trading Signals in an MQL5 Expert Advisor"
Check out the new article: How to Implement Metaprompting for Trading Signals in an MQL5 Expert Advisor . Metaprompting is an approach in which the LLM itself optimizes trading instructions based on actual P&L and signal quality metrics. The article demonstrates a practical implementation in Python
Discussing the article: "Online Portfolio Selection: A Provable Regret Bound, and the Cost That Eats It"
Check out the new article: Online Portfolio Selection: A Provable Regret Bound, and the Cost That Eats It . The article implements Online Portfolio Selection in MQL5: exact simplex projection, four allocators (EG, Universal Portfolio, PAMR, OLMAR), and a BCRP solver on a concave objective. We verify
Discussing the article: "Automating Classic Market Methods in MQL5 (Part 9): Linda Bradford Raschke's 3/10 Oscillator System"
Check out the new article: Automating Classic Market Methods in MQL5 (Part 9): Linda Bradford Raschke's 3/10 Oscillator System . The article implements two swing setups in MQL5: Anti, which enters on the first 3/10 oscillator pullback after a signal line zero confirmation with price confirmation












