From One Price to Four: Range-Based Volatility Estimators for MetaTrader 5
Close-to-close volatility ignores the high, the low, and overnight gaps. We build a reusable MQL5 library implementing four range-based estimators from Parkinson to the gap-robust Yang-Zhang, and put it to work in a comparison indicator and a set of adaptive volatility bands.
From Basic to Intermediate: Object Events (II)
In this article, we will look at how the last three types of events generated by an object work. Understanding this will be very interesting, because in the end we will do something that may seem crazy to many people, but it is entirely possible and produces a very surprising result.
Neural Networks in Trading: A Cross-Domain Time Series Forecasting Framework (TimeFound)
In this article, we build the core of the TimeFound intelligent model step by step, adapting it to real-world time series forecasting tasks. If you are interested in the practical implementation of neural network patching algorithms in MQL5, you have come to the right place.
The Repository Pattern in MQL5: Abstracting Trade History Access for Testable EA Logic
Direct calls to the MQL5 History API inside analytics components create hidden terminal dependencies that make isolated testing structurally impossible. This article constructs an ITradeRepository abstraction layer with CLiveTradeRepository and CMockTradeRepository implementations, enabling the same analytics engine and equity curve panel to operate identically against live account data or a deterministic in-memory dataset. Repository injection eliminates direct API coupling, supports offline validation, and confines data source changes to a single implementation class.
Neural Networks in Trading: Generalizing Time Series Without Data-Specific Dependence (Core Model Modules)
We continue our acquaintance with the Mamba4Cast framework. Today, we will delve into the practical implementation of the proposed approaches. Mamba4Cast was designed not for lengthy warm-up on every new time series, but for immediate deployment. Thanks to the concept of Zero-Shot Forecasting, the model can produce high-quality forecasts on real-world data without additional training or hyperparameter tuning.
Hierarchical Risk Parity: A Robust Portfolio Allocator and Expert Advisor
We implement a Hierarchical Risk Parity allocator in MQL5 as a single class, validate each stage against an independent Python reference, and package it in a rebalancing Expert Advisor. The pipeline covers returns, covariance/correlation, clustering, quasi-diagonalization, and recursive bisection, and contrasts HRP with Markowitz on stressed data. You finish with a verified allocator and an EA ready for basket-level testing.
Feature Engineering for ML (Part 8): Entropy Features in MQL5
An MQL5 port of four entropy estimators — Shannon, Plug-In, Lempel-Ziv, and Kontoyiannis — operating on the intrabar tick-rule sequence. CopyTicksRange() limits data to the broker's cached tick window, so features apply to recent bars only. The implementation encodes bid-direction ticks from MqlTick, replaces NumPy-dependent steps with array-based methods, and ships CEntropyFeatures.mqh and EntropyViewer.mq5 for EA and indicator use.
From Basic to Intermediate: FileSave and FileLoad
In today’s article, we will look at several ways to work with the FileSave and FileLoad library functions. Although many people consider them of limited use because of certain limitations or difficulties they create in specific scenarios, properly understanding how these two functions work can save us a great deal of effort at certain points. They are also an excellent way to work with log files.
Real-Time Trade Event Logger to SQLite via MQL5 DLL Bridge
The article shows how to build an MQL5 EA that writes every deal to an SQLite database the moment it appears, using the built-in Database API as the SQLite bridge. It implements an event data model, a prepared INSERT workflow reused across calls, session-safe recovery after restarts, and deal detection via OnTrade(). You can open the resulting file with any SQLite client to run queries for analysis and reporting.
Automated Trade Statement Exporter to Excel-Compatible XLSX in MQL5
An MQL5 script reconstructs closed trades from deal history using a two-pass SL/TP lookup and exports them to an Excel-compatible XLSX file without third-party libraries. Four cooperating classes handle trade data, history reconstruction, SpreadsheetML XML generation, and ZIP assembly via .NET's ZipFile class through a direct ShellExecuteW call with marker-file polling. The output opens in Excel and Google Sheets with correct numeric types, formatted date columns, and a bold header row.
Exporting Symbol Tick Data to Binary Files in MQL5 for Offline Analysis
The article delivers a complete, verifiable tick export path from MQL5 to a binary file and into Python. It defines a 64‑byte header, 48‑byte records with millisecond time and flags, an export pipeline using CopyTicksRange(), and a single‑call NumPy loader. Users obtain compact, precision‑preserving files and a reproducible workflow for vectorized analysis.
Implementing and Benchmarking Bag-of-SFA-Symbols (BOSS) Against Dynamic Time Warping (DTW)
This article implements BOSS from scratch in MQL5 and applies it to regime classification: SFA turns windows into words, bags record word frequencies, and an ensemble over window lengths votes on labels. We cover the encoding steps, the BOSS distance, training with auto-generated regime labels, and practical parameters. A BTCUSD benchmark versus DTW shows higher macro accuracy on clean data and markedly faster inference.
Exporting Custom Indicator Buffers to CSV for Python Backtesting Pipelines
We build a CSV exporter for MQL5 custom indicators that preserves the exact values seen on the chart. The script creates the indicator handle with iCustom, waits for BarsCalculated, aligns buffers to CopyRates, and writes a locale-safe CSV that pandas loads with parsed dates and NaN for warm-up bars. It addresses compile-time argument limits, jagged-array workarounds, and EMPTY_VALUE handling, enabling reliable Python backtests without re-coding the indicator.
MCMC Sampling Methods: The Slice Sampling Algorithm
The article examines slice sampling — an adaptive MCMC algorithm that automatically adjusts its sampling parameters. Its effectiveness is demonstrated using Bayesian linear and logistic regression models, and the results are compared with classical frequentist methods.
Measuring broker execution quality in MQL5: Why your live account doesn't match the backtest
Live performance often drifts from backtests because of execution friction. We introduce an MQL5 diagnostic EA that records entry and exit slippage, asymmetry, observed spread, requotes, and per-leg latency, using a precise probe mode and an approximate passive mode, and writes every sample to CSV. Use the results to distinguish strategy issues from execution effects across your terminal, network, broker, and liquidity.
Path Signatures for Lead-Lag Detection
Build a level-2 path-signature engine in pure MQL5 to read the lead-lag ordering between two data streams without choosing a lag and without a linear model. The article delivers a reusable library, an indicator that plots the Levy‑area oscillator, and a simple rule‑based Expert Advisor. Code is cross‑checked against closed‑form cases, and the components are ready to plug into your projects.
Generating a Per-Symbol Trade Analytics PDF Report from MQL5
This article shows how to generate a dependency-free, single-page PDF report in MQL5 using only string assembly and the FILE_BIN API. The script computes per-symbol trade statistics, then renders a labeled table and an equity curve with explicit PDF color and drawing operators. Statistics are calculated in a standalone module, so every value can be verified against synthetic data without relying on a live trading account.
Neural Networks in Trading: A Cross-Domain Time Series Forecasting Framework (Conclusion)
The article focuses on the practical implementation of the TimeFound model for time series forecasting. The key stages of implementing the framework's main approaches using MQL5 are examined.
Implementing Anchored VWAP Indicator in MQL5: A Step-by-Step Guide
A step-by-step guide to building an anchored VWAP indicator with an interactive draggable anchor line in MQL5. The article covers the complete implementation, including calculation methodology, session resets, standard deviation bands, and custom visualization. Learn the architectural design decisions behind stateless boundary detection, multi-instance support, and cross-asset volume handling to build a versatile indicator with benchmarking, technical, and analytical capabilities.
Integrating MQL5 with Data Processing Packages (Part 10): Deploying Python AutoML Pipelines for Strategy Testing
This article presents a reproducible MetaTrader 5 workflow: collect history, engineer nine context features, label simulated EMA crossover trades, train with FLAML, and export to ONNX with fixed opset and plain probabilities. The Expert Advisor loads the model natively, mirrors the Python feature contract, and uses a tunable confidence threshold as a trade filter. Readers can swap signals and features to reuse the same pipeline.
Feature Engineering for ML (Part 11): Fractal Features in Python
The article examines a Williams five‑bar fractal feature pipeline and shows how a centered rolling window creates a true look‑ahead leak. It identifies two additional silent bugs—a hardcoded shift tied to the default n and a volatility threshold that ignores its input—and consolidates fixes under a single leak_safe flag. Readers get leak‑free fractal, level, trend, and signal features, plus guidance on when unshifted columns remain valid for labeling.
A Team of AI Agents with Profit-Based Rotation: The Evolution of a Living Trading System in MQL5
Financial management as an ecosystem: Seven AI traders with different personalities and strategies instead of a single algorithm. They compete for capital, learn from their mistakes, and make decisions collectively. The article explains the principles behind the Modern RL Trader system, in which the code possesses consciousness and emotions, creating a living, evolving trading mind.
Neural Networks in Trading: An Intelligent Forecast Pipeline (Time-MoE)
We invite you to explore the modern Time-MoE framework, which has been adapted for time series forecasting tasks. In this article, we will implement the key components of the architecture step by step, providing explanations and practical examples along the way. This approach will allow you not only to understand how the model works, but also to apply those principles to real-world trading scenarios.
Price Action Analysis Toolkit Development (Part 77): Building a Searchable Indicator Panel for MetaTrader 5
A modular indicator search system for MetaTrader 5 that replaces manual navigation through built-in indicator categories with a searchable interface. The application integrates an indicator catalog, search engine, chart launcher, and graphical panel, allowing indicators to be located, filtered, and attached to the appropriate chart window from a single interface.
The Avellaneda-Stoikov Model: Inventory-Aware Quoting for Two-Sided Strategies
This article builds the Avellaneda–Stoikov formulas in MQL5, feeds them with rolling estimates of mid-price volatility and a proxy for order-flow intensity, and plots the reservation price with bid and ask in real time. A bar-by-bar simulation contrasts adaptive and fixed quoting under the same fill rules. The result is a tested class, an indicator, and a backtest to improve inventory control in two‑sided strategies.