Articles on the MQL5 programming and use of technical indicators

icon

Technical indicators constitute an important part of trading, and every trader tries to find something new. The authors of these articles talk about econometrics and machine learning, automatic marking of Elliott Waves and digital filters - everything from the classical methods of analysis to the modern interpretation of classical ideas.

The category features articles that will teach you how to develop a custom indicator and contains unique collections of ready-to-use mathematically explained William Blau's trading ideas.

Add a new article
latest | best
preview
Recurrence Network Analysis (RNA) in MQL5: From Recurrence Matrices to Complex Networks

Recurrence Network Analysis (RNA) in MQL5: From Recurrence Matrices to Complex Networks

The article extends the MQL5 recurrence library to Recurrence Network Analysis (RNA) by treating recurrence matrices as adjacency matrices of undirected graphs. It implements core network metrics—clustering, transitivity, average path length, betweenness, assortativity, and density—and applies them in rolling windows for single-series RNA and Joint RNA (JRNA). A modular metrics engine and two indicators visualize the evolving network structure on MetaTrader 5 charts for practical time-series analysis.
preview
MQL5 Wizard Techniques you should know (Part 97): Using Convex Hull and a miniature GRU Network in a Custom Trailing Stop Class

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.
preview
Building a Traditional Point and Figure Indicator in MQL5

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.
preview
Market Microstructure in MQL5 (Part 5): Microstructure Noise

Market Microstructure in MQL5 (Part 5): Microstructure Noise

The article extends MicroStructure_Foundation.mqh with a MicrostructureAnalysis struct and five functions that decompose M1 price variation into a quoted spread proxy, Roll-implied spread, OHLC-based noise ratio, order imbalance, and an adverse selection component. A wrapper populates these fields and links them to the volatility suite from Part 4. Empirical thresholds come from 602 NQ E-mini NY sessions (Jan 2024–Jun 2026), helping you gate volatility signals, size risk, and recognize spread-driven frictions.
preview
From Static MA to Adaptive Filtering (Part 1): Introducing SAMA with NLMS in MQL5

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.
preview
Beyond GARCH (Part V): Fitting the Multifractal Spectrum in MQL5

Beyond GARCH (Part V): Fitting the Multifractal Spectrum in MQL5

This article builds the Spectrum Fitter: from tau(q) we compute f(alpha) with a discrete Legendre transform, then fit Normal, Binomial, Poisson, and Gamma spectra under box constraints using BLEIC. The best model by SSE is selected, and its parameters (eg, alpha min, alpha max or alpha_0, gamma) become the cascade inputs for multifractal simulation.
preview
Beyond GARCH (Part VI): Fractional Brownian Motion And The Multiplicative Cascade in MQL5

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.
preview
Heatmap Visualization of Intraday Return Patterns in MQL5 Using CCanvas

Heatmap Visualization of Intraday Return Patterns in MQL5 Using CCanvas

MetaTrader 5 provides no native tool for visualizing intraday return patterns across time dimensions simultaneously. This article implements a custom indicator that aggregates historical bar returns into a 5×24 matrix indexed by weekday and hour of day, then renders the result as a color-interpolated heatmap inside an indicator subwindow using CCanvas. Green cells represent positive average returns, red cells negative, with color intensity encoding return magnitude.
preview
Rolling Sharpe Ratio with Statistical Significance Bands in MQL5

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.
preview
Automatic Session Volume Profile Builder in MQL5: Rendering POC and Value Area Without Third-Party Tools

Automatic Session Volume Profile Builder in MQL5: Rendering POC and Value Area Without Third-Party Tools

Implement a session-focused volume profile in MQL5: acquire ticks with CopyTicksRange(), bin prices, and compute POC, VAH, and VAL by the 70% approach. The indicator renders directly on the chart as native objects, supports fixed-width scaling for consistent geometry across timeframes, and refreshes on each new session. This provides objective reference levels without external dependencies.
preview
MQL5 Wizard Techniques you should know (Part 100): Sliding Window Median and Bidirectional LSTM for a Custom Trailing Stop

MQL5 Wizard Techniques you should know (Part 100): Sliding Window Median and Bidirectional LSTM for a Custom Trailing Stop

CTrailingSlidingMedianBiLSTM is a custom MQL5 Wizard trailing module that combines robust median/MAD outlier filtering with a BiLSTM context score in the range [-1, 1]. Four algorithm modes (standard, bands, RSI, adaptive) target noise, mean-reverting bursts and liquidity spikes, reducing premature stop adjustments. This module is intended for side-by-side evaluation with diverse entry signals and money management settings.
preview
Beyond GARCH (Part VII): Monte Carlo Volatility Forecasting in MQL5

Beyond GARCH (Part VII): Monte Carlo Volatility Forecasting in MQL5

We implement the CMonteCarlo module that turns the fitted MMAR parameters into a volatility forecast via Monte Carlo. It runs N independent simulations over a chosen horizon and reports mean, median, standard deviation, and a percentile-based 95% confidence interval, with access to per-run values if needed. Adaptive cascade depth selects the minimal k such that b^k covers the horizon, keeping the run fast and consistent.
preview
Feature Engineering for ML (Part 8): Entropy Features in MQL5

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.
preview
Market Microstructure in MQL5 (Part 7): Regime Classification

Market Microstructure in MQL5 (Part 7): Regime Classification

We integrate eleven one-minute microstructure measurements from Parts 2–6 into a composite regime label with confidence and direction. A rule-based RegimeClassifier() assigns one of six regimes—Normal, Stressed, Noisy, Informed, Trending, Mean-Reverting—using empirically derived thresholds from 514 NQ M1 sessions (May 2024–May 2026). The deliverable includes MARKET_REGIME, RegimeAnalysis, and PopulateRegimeAnalysis(), enabling position sizing, stop placement, and signal filtering from a single call.