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.
Community of Scientists Optimization (CoSO): Practice
We resume the topic of optimization by the scientific community. CoSO should not be viewed as a ready-made solution, but as a promising research platform. With proper development, CoSO can find its niche in tasks where adaptability and resilience to change are important, and computation time is not critical.
Market Microstructure in MQL5 (Part 6): Order Flow
This article adds six order-flow functions and a new OrderFlowAnalysis struct to MicroStructureFoundation.mqh: VPINOHLC, signed flow imbalance, trade intensity versus a 20-session baseline, a late-minus-early smart-money index, flow momentum, and a wrapper that outputs a confidence weight. Flow confidence is gated by noise and jump intensity from Parts 5 and 4. Calibrated on 602 NQ M1 NY sessions, it provides ready-to-use intraday flow signals with documented thresholds.
How to Detect and Normalize Chart Objects in MQL5 (Part 3): Alerting and Automated Trading from Manually Drawn Objects
This article extends the chart‑object detector into a modular monitoring and execution layer. It defines objective interaction rules (touch, cross, breakout) for trendlines, Fibonacci levels, channels, rectangles, and pitchforks, then routes events through an interaction detector, alert manager, and optional trade executor. Orders use object geometry for stop‑loss and take‑profit. The result is a reproducible pipeline that converts static drawings into actionable alerts and, if enabled, trades.
Beyond GARCH (Part VI): Fractional Brownian Motion And The Multiplicative Cascade in MQL5
This article implements the MMAR Simulation Engine that turns fitted parameters (H, distribution, coefficients, sample volatility) into synthetic price paths. It builds multifractal trading time via a multiplicative cascade, synthesizes fractional Brownian motion with Davies–Harte or Cholesky, scales it to target volatility, and composes the process by time deformation. Readers get a reusable MQL5 class, method choices by path length, and validation steps for scenario testing and Monte Carlo use in the next part.
Price Action Analysis Toolkit Development (Part 74): Building an MQL5 Expert Advisor from Indicator Buffers
This article implements an MQL5 Expert Advisor that connects to a weekend gap indicator via iCustom and CopyBuffer, reading six buffers for buy/sell signals and SL/TP. It validates broker stop-distance rules, handles closed-bar confirmation and duplicate-signal control, and executes orders with a configurable magic number. The EA also includes midpoint stop-loss management and a backtesting procedure so you can verify behavior and adapt parameters to your setup.
Building a Traditional Point and Figure Indicator in MQL5
This article implements a custom Point and Figure indicator in MQL5 that maps price movement into X/O columns using a fixed box size and three-box reversal logic. We define the base price, convert prices into box intervals, manage trends and reversals, auto-scale the indicator window, and render symbols with objects, providing a clean, time-independent view of trends, breakouts, and support/resistance.
Rolling Sharpe Ratio with Statistical Significance Bands in MQL5
This article presents a custom MetaTrader 5 indicator that computes a rolling annualized Sharpe ratio and plots configurable z-score significance bands based on Lo's asymptotic standard error. It uses a circular return buffer with incremental variance to keep O(1) updates. We explain the n^(-1/2) uncertainty scaling, the inflation of intervals at high Sharpe values, and how to set per-instrument annualization for correct deployment.
A Practical Kalman Filter Price Smoother in MQL5: Adaptive Noise Estimation Without External Libraries
Fixed-weight moving averages introduce regime-insensitive lag. This work presents an adaptive scalar Kalman filter indicator in native MQL5 that estimates process noise Q from rolling return variance and measurement noise R from rolling price variance, with floor clamps for stability, and recomputes the Kalman Gain on every bar. The chart-overlay output is benchmarked against a 20-period EMA using MAE, RMSE, lag, and smoothness metrics to quantify tracking and noise suppression.
From Basic to Intermediate: Object Events (I)
In this article, we will look at three of the six events that MetaTrader 5 can generate when some change occurs to an object on the chart. These events are very useful from the standpoint of user interaction. This is because, without understanding these events, we would have to put in much more effort to maintain a specific chart configuration when trying to manage objects for particular purposes.
From Basic to Intermediate: Objects (III)
In today's article, we will look at how to implement a very attractive and interesting interaction system, especially for those who are just beginning to practice programming in MQL5. There is nothing fundamentally new here. Thanks to my approach to the topic, it will be much easier to understand everything, because we will see in practice how to develop a program using a structured approach with a practical and engaging goal.
Quantum Neural Network in MQL5 (Part II): Training a Neural Network with Backpropagation on ALGLIB Markov Matrices
The article presents an innovative quantum neural network architecture for algorithmic trading that combines the principles of quantum mechanics with modern machine learning methods. The system includes quantum effects (resonance, interference, decoherence), multi-level memory of different time scales, Markov chains with the ALGLIB library, and adaptive parameter control. The full implementation is done in MQL5 using the built-in matrix/vector types, which removes implementation barriers in MetaTrader 5.
AI Trading Platform: Why MetaTrader 5 Is the Best Choice for Algorithmic Trading with Python, ONNX, and AI Assistant
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 code via the AI Assistant in MetaEditor, a quality model, a custom-created Expert Advisor, testing, and a controllable launch of a trading system.
Trading Options Without Options (Part 2): Use in Real Trading
The article considers simple options strategies and their implementation in MQL5. We will develop a basic EA that will be modernized and become more complex.
MQL5 Wizard Techniques you should know (Part 97): Using Convex Hull and a miniature GRU Network in a Custom Trailing Stop Class
For this article we look at a custom MQL5 Wizard class for Trailing Stops. Our implemented custom class ‘CTrailingConvexHullGRU’, is built from merging the Convex Hull algorithm with a GRU network. As always we seek to develop a model that is testable with MQL5 Wizard-Assembled Expert Advisors and can be tuned with various Money Management and entry Signals classes. Our testing is with the 'Envelopes' and the RSI classes for Signal.
Beyond the Clock (Part 3): Building an Indicator Window for Alternative Bars in MQL5
AlternativeBarsViewer is a subwindow indicator that renders all ten alternative bar types as color‑coded candles using the same CBarConstructor hierarchy as BarBuilderEA, ensuring identical bars. It supports three data sources (real ticks, synthetic OHLC ticks, or the EA's CSV) and two render modes (TIME and INDEX) toggleable at runtime. Degenerate bars are highlighted and summarized on a compact panel, enabling live calibration without leaving the terminal.
Building a Divergence System: Creating the MPO4 Custom Indicator
We introduce MPO4, a pressure-based oscillator that emphasizes the body and direction of candles in the context of current volatility. The article details its mathematics, normalization into a bounded range, and the EMA smoothing, then builds a pivot-driven divergence module designed not to repaint. You get complete MQL5 implementation and practical guidance for interpreting signals, including a comparison with RSI as an alternative source.
Implementing the Decorator Pattern in MQL5: Adding Logging, Timing, and Filtering to Any Indicator Non-Invasively
Cross-cutting concerns like logging, timing, and threshold filtering should not live inside indicator classes. We show how to apply the decorator pattern in MQL5 with a shared IIndicator interface, an owning CBaseDecorator, and concrete CLoggingDecorator, CTimingDecorator, and CThresholdFilterDecorator layers. You can stack behaviors per EA, keep computation code closed to modification, and get deterministic cleanup by deleting only the outermost decorator.
Neural Networks in Trading: LSTM Optimization for Multivariate Time Series Forecasting (Final Part)
We continue to implement the DA-CG-LSTM framework, which offers innovative methods for time series analysis and forecasting. The use of CG-LSTM and dual attention allows for more accurate detection of both long-term and short-term dependencies in data, which is particularly useful for working with financial markets.
Market Simulation: Getting started with SQL in MQL5 (IV)
Many people tend to underestimate SQL, or even not use it at all, because they do not fully understand how it actually works. When running queries against an SQL database, we are not always looking for a universal answer; in some cases, we need a very specific and practical answer. If a database is created with a proper structure and data model, almost any type of information can be integrated into it.
From Basic to Intermediate: Handling Mouse Events
This article belongs to the category of materials where simply looking through and studying the code is definitely not enough to understand the processes involved. In fact, you need to create an executable application and run it on any chart. This is done so that you can understand small details that would otherwise be extremely difficult to grasp, such as using the keyboard and mouse together to create certain elements.
Community of Scientists Optimization (CoSO): Theory
Secrets of effective optimization of trading strategies in metaheuristic approaches. Community of Scientists Optimization is a new population-based algorithm inspired by the mechanisms of the scientific community. Unlike traditional nature-inspired metaphors, CoSO models unique aspects of human scientific activity: publishing results in journals, competing for grants, and forming research teams.
Shape of Price: An Introduction to TDA and Takens Embedding in MQL5
The article presents a practical foundation for shape analysis of price series in MQL5. It implements Takens time‑delay embedding to build a phase‑space point cloud and computes the full pairwise distance matrix under selectable norms. The CTDAPointCloud and CTDADistance classes are provided with a demo script that embeds chart data and outputs results, preparing inputs for downstream topological tools.
MQL5 Trading Tools (Part 37): Adding a Per-Object Property-Editing Ribbon to the Canvas Drawing Layer
We add a descriptor-driven property stack and a floating ribbon that binds to the current selection on the drawing layer. The article covers the descriptor list for each tool, the engine get/set API with snapshot-and-restore live preview, and widget renderers for color, opacity, line width, line style, fonts, and level visibility. You get in-place, real-time editing of object appearance via a compact, draggable panel.
Price Action Analysis Toolkit Development (Part 73): Building a Weekend Gap Trading Signal System in MQL5
We extend the weekend gap toolkit with an indicator that turns gap structure into tradeable signals. When price confirms back into the gap, the indicator issues buy/sell arrows, sets TP at the opposite edge, and places SL using current-week extremes. It maintains non-repainting behavior, reconstructs historical signals, updates live, and provides EA-ready buffers for entry markers and TP/SL to support automation.
From Static MA to Adaptive Filtering (Part 2): Implementing the SAMA_NLMS Indicator in MQL5
This article implements the NLMS-based Self-Adaptive Moving Average as a working MQL5 indicator. It provides the complete source code and explains the key design choices, including inline execution, uniform weight seeding, closed‑bar updates, and stability bounds, along with installation, usage, and limitations. The result is a compiled, chart‑ready SAMA_NLMS indicator and a clear basis for subsequent EA benchmarking.
Overcoming Accessibility Problems in MQL5 Trading Tools (Part V): Gesture-Based Trading With Computer Vision
This article shows how to build a hands-free trading workflow for MetaTrader 5 by translating webcam-tracked hand gestures into MQL5 trade commands. We cover the architecture (MediaPipe/OpenCV in Python plus an MQL5 EA), gesture-to-action mapping, and interprocess communication via Global Variables or HTTP polling. You will implement the EA, execute BUY/SELL/CLOSE actions, and validate latency and reliability under real‑time conditions.
Feature Engineering for ML (Part 6): Microstructural Features in MQL5
The article introduces CMicrostructureFeatures, an MQL5 class for bar‑level microstructure features: Roll spread/impact, Corwin‑Schultz spread and sigma, Kyle's Lambda, Amihud's ILLIQ, and Hasbrouck's Lambda. Calculations rely solely on OHLCV using rolling windows. It clarifies the implications of MT5 tick volume for lambda estimators and keeps spread estimators volume‑independent. A validation script asserts sizing and basic bounds on outputs.
Neural Networks in Trading: LSTM Optimization for Multivariate Time Series Forecasting (DA-CG-LSTM)
This article introduces the DA-CG-LSTM algorithm, which offers new approaches to time series analysis and forecasting. It explains how innovative attention mechanisms and model flexibility can improve forecast accuracy.
Price Action Analysis Toolkit Development (Part 72): Building a Gap Fill Indicator in MQL5
An EA-ready weekend gap-fill tool for MetaTrader 5 that detects gaps, confirms complete fills, and posts deterministic buy/sell values to indicator buffers. It reconstructs historical events, monitors live markets without repainting, and visualizes gap structure directly on the chart. Configurable alerts and clear object graphics support both manual review and automated execution.
Graph Theory: Network Flow of Commodities (Ford-Fulkerson Algorithm), Used as a Liquidity-Capacity Engine
The article presents an MQL5 Expert Advisor that adapts the Ford–Fulkerson max-flow method into a liquidity-capacity filter. Market structures—Swing Highs/Lows, Fair Value Gaps, Order Blocks, and Liquidity Pools—form a directed graph with edge capacities from volume, price reaction, distance, and structure quality. Maximum flow qualifies ICT setups, filters weak paths, and drives dynamic position sizing for a consistent, two-stage decision process.
MQL5 Wizard Techniques you should know (Part 96): Using Wavelet Thresholding and LSTM Network in a Custom Money Management Class
In this article we consider a custom MQL5 Wizard class that processes Money Management. Our custom class is labelled ‘CMoneyWaveletLSTM’, and is developed by combining the Wavelet Thresholding algorithm with an LSTM network. As has been the case throughout these series, the developed model is testable with MQL5 Wizard-Assembled Expert Advisors that can be tuned with different trailing stops and entry Signals classes. We maintain our entry Signal, as in past articles as the built-in 'Envelopes' class and the RSI class.
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.
Competitive Learning Algorithm (CLA)
The article presents the Competitive Learning Algorithm (CLA), a new metaheuristic optimization method based on simulating the educational process. The algorithm organizes the population of solutions into classes with students and teachers, where agents learn through three mechanisms: following the best in the class, using personal experience, and sharing knowledge between classes.
Gaussian Processes in Machine Learning (Part 1): Classification Model in MQL5
The article considers the classification model of Gaussian processes. We will start by studying its theoretical principles moving on to the practical development of the GP library in MQL5.
Neural Networks in Trading: Actor—Director—Critic (Final Part)
The Actor–Director–Critic framework is an evolution of the classic agent learning architecture. The article presents practical experience of its implementation and adaptation to financial market conditions.
CSV Data Analysis (Part 4): Building an Automated Python-Driven Comparative Analysis Module for MQL5 Strategy Validation
The article presents a reproducible MetaTrader 5 to Python pipeline for large-scale indicator research. An MQL5 export schema captures fixed columns, including custom lag and whipsaw counters. A baseline module performs parameter-matched comparisons across symbols and timeframes, while a walk-forward module locks the InSample optimum and evaluates it on unseen data. Readers gain unbiased robustness measurements and automation that removes manual selection bias.
Swing Extremes and Pullbacks (Part 4): Dynamic Pullback Depth Using Volatility Models
This article replaces binary swing validation with a volatility‑normalized pullback model. Retracement depth is measured as a ratio of the prior impulse and calibrated to a rolling ATR regime, while entries require a minimum quality score and confirmation by structure or liquidity signals. The five‑layer design integrates detection, validation, liquidity mapping, regime‑aware scoring, and execution, helping you filter weak corrections and size stops dynamically to current conditions.
From Static MA to Adaptive Filtering (Part 1): Introducing SAMA with NLMS in MQL5
This article introduces the Self-Adaptive Moving Average (SAMA), an adaptive filter leveraging the Normalized Least Mean Squares (NLMS) algorithm. It explores why fixed-period averages fail, how NLMS adapts bar by bar, and the engineering protections required for production. This conceptual and mathematical foundation prepares you for the MQL5 code implementation in Part 2.
MQL5 Trading Tools (Part 36): Adding Shape and Annotation Tools with In-Place Label Editing to the Canvas Drawing Layer
We add eight shape tools and nine annotation tools to the canvas and implement a full in-place label-editing system. The article walks through geometry, AA rendering, shared word-wrap and supersampled text helpers, and the caret-driven state machine for typing, navigation, and selection. This yields a complete, consistent annotation toolkit with editable labels that plugs into the prior interaction pipeline.