Statistical Arbitrage Through Cointegrated Stocks (Part 7): Scoring System 2
Statistical Arbitrage Through Cointegrated Stocks (Part 7): Scoring System 2
This article describes two additional scoring criteria used for selection of baskets of stocks to be traded in mean-reversion strategies, more specifically, in cointegration based statistical arbitrage. It complements a previous article where liquidity and strength of the cointegration vectors were presented, along with the strategic criteria of timeframe and lookback period, by including the stability of the cointegration vectors and the time to mean reversion (half-time). The article includes the commented results of a backtest with the new filters applied and the files required for its reproduction are also provided.
From Novice to Expert: Time Filtered Trading
From Novice to Expert: Time Filtered Trading
Just because ticks are constantly flowing in doesn’t mean every moment is an opportunity to trade. Today, we take an in-depth study into the art of timing—focusing on developing a time isolation algorithm to help traders identify and trade within their most favorable market windows. Cultivating this discipline allows retail traders to synchronize more closely with institutional timing, where precision and patience often define success. Join this discussion as we explore the science of timing and selective trading through the analytical capabilities of MQL5.
Unified Validation Pipeline Against Backtest Overfitting
Unified Validation Pipeline Against Backtest Overfitting
This article explains why standard walkforward and k-fold CV inflate results on financial data, then shows how to fix it. V-in-V enforces strict data partitions and anchored walkforward across windows, CPCV purges and embargoes leakage while aggregating path-wise performance, and CSCV measures the Probability of Backtest Overfitting. Practitioners gain a coherent framework to assess regime robustness and selection reliability.
From Novice to Expert: Enhancing Liquidity Strategies with Multi-Timeframe Structural Confirmation in MQL5
From Novice to Expert: Enhancing Liquidity Strategies with Multi-Timeframe Structural Confirmation in MQL5
The alignment of higher-timeframe liquidity structures with lower-timeframe reversal patterns can greatly influence both the likelihood and direction of the next price movement. By integrating structural liquidity zones from higher timeframes with precise reversal confirmations on lower timeframes, traders can improve entry timing and overall trade quality. This article demonstrates how to reinforce liquidity-based trading strategies through higher-timeframe structural confirmation—and how to implement this approach effectively using MQL5.
Integrating MQL5 with Data Processing Packages (Part 8): Using Graph Neural Networks for Liquidity Zone Recognition
Integrating MQL5 with Data Processing Packages (Part 8): Using Graph Neural Networks for Liquidity Zone Recognition
This article shows how to represent market structure as a graph in MQL5, turning swing highs/lows into nodes with features and linking them by edges. It trains a Graph Neural Network to score potential liquidity zones, exports the model to ONNX, and runs real-time inference in an Expert Advisor. Readers learn how to build the data pipeline, integrate the model, visualize zones on the chart, and use the signals for rule-based execution.
MQL5 Trading Tools (Part 24): Depth-Perception Upgrades with 3D Curves, Pan Mode, and ViewCube Navigation
MQL5 Trading Tools (Part 24): Depth-Perception Upgrades with 3D Curves, Pan Mode, and ViewCube Navigation
In this article, we enhance the 3D binomial distribution graphing tool in MQL5 by adding a segmented 3D curve for improved depth perception of the probability mass function, integrating pan mode for view target shifting, and implementing an interactive view cube with hover zones and animations for quick orientation changes. We incorporate clickable sub-zones on the view cube for faces, edges, and corners to animate camera transitions to standard views, while maintaining switchable 2D/3D modes, real-time updates, and customizable parameters for immersive probabilistic analysis in trading.
MQL5 Trading Tools (Part 25): Expanding to Multiple Distributions with Interactive Switching
MQL5 Trading Tools (Part 25): Expanding to Multiple Distributions with Interactive Switching
In this article, we expand the MQL5 graphing tool to support seventeen statistical distributions with interactive cycling via a header switch icon. We add type-specific data loading, discrete and continuous histogram computation, and theoretical density functions for each model, with dynamic titles, axis labels, and parameter panels that adapt automatically. The result lets you overlay distribution models on the same sample and compare fit across families without reloading the tool.
From Novice to Expert: Forex Market Periods
From Novice to Expert: Forex Market Periods
Every market period has a beginning and an end, each closing with a price that defines its sentiment—much like any candlestick session. Understanding these reference points allows us to gauge the prevailing market mood, revealing whether bullish or bearish forces are in control. In this discussion, we take an important step forward by developing a new feature within the Market Periods Synchronizer—one that visualizes Forex market sessions to support more informed trading decisions. This tool can be especially powerful for identifying, in real time, which side—bulls or bears—dominates the session. Let’s explore this concept and uncover the insights it offers.
Battle Royale Optimizer (BRO)
Battle Royale Optimizer (BRO)
The article explores the Battle Royale Optimizer algorithm — a metaheuristic in which solutions compete with their nearest neighbors, accumulate “damage,” are replaced when a threshold is exceeded, and periodically shrink the search space around the current best solution. It presents both pseudocode and an MQL5 implementation of the CAOBRO class, including neighbor search, movement toward the best solution, and an adaptive delta interval. Test results on the Hilly, Forest, and Megacity functions highlight the strengths and limitations of the approach. The reader is provided with a ready-to-use foundation for experimentation and tuning key parameters such as popSize and maxDamage.
Building a Research-Grounded Grid EA in MQL5: Why Most Grid EAs Fail and What Taranto Proved
Building a Research-Grounded Grid EA in MQL5: Why Most Grid EAs Fail and What Taranto Proved
This article implements a regime-adaptive grid trading EA based on the PhD research of Aldo Taranto. It presents a regime‑adaptive grid trading EA that constrains risk through restartable cycles and equity‑based safeguards. We explain why naive grids fail (variance growth and almost‑sure ruin), derive the loss formula for real‑time exposure, and implement regime‑aware gating, ATR‑dynamic spacing, and a live kill switch. Readers get the mathematical tools and production patterns needed to build, test, and operate a constrained grid safely.
Creating Custom Indicators in MQL5 (Part 10): Enhancing the Footprint Chart with Per-Bar Volume Sentiment Information Box
Creating Custom Indicators in MQL5 (Part 10): Enhancing the Footprint Chart with Per-Bar Volume Sentiment Information Box
The article enhances an MQL5 footprint indicator with a compact box above each candle that summarizes net delta, total volume, and buy/sell percentages. We implement supersampled anti‑aliased rendering, rounded corners via arc and quadrilateral rasterization, and per‑pixel alpha compositing. Supporting utilities include ARGB conversion, scanline fills, and box‑filter downsampling. The box delivers fast sentiment reads that stay legible across zoom levels.
Coral Reefs Optimization (CRO)
Coral Reefs Optimization (CRO)
The article presents a comprehensive analysis of the Coral Reef Optimization (CRO) algorithm, a metaheuristic method inspired by the biological processes of coral reef formation and development. The algorithm models key aspects of coral evolution: broadcast spawning, brooding, larval settlement, asexual reproduction, and competition for limited reef space. Particular attention is paid to the improved version of the algorithm.
Price Action Analysis Toolkit Development (Part 65): Building an MQL5 System to Monitor and Analyze Manually Drawn Fibonacci Levels
Price Action Analysis Toolkit Development (Part 65): Building an MQL5 System to Monitor and Analyze Manually Drawn Fibonacci Levels
The Fibonacci retracement tool is an essential component of price action analysis, providing critical levels for potential market reactions. However, its effectiveness is often limited by the need for continuous human monitoring, which can lead to missed setups. In this part of our series, we introduce a tool that synchronizes and actively monitors manually drawn Fibonacci levels using MQL5, combining discretionary insight with automated oversight.
MQL5 Trading Tools (Part 26): Integrating Frequency Binning, Entropy, and Chi-Square in Visual Analyzer
MQL5 Trading Tools (Part 26): Integrating Frequency Binning, Entropy, and Chi-Square in Visual Analyzer
In this article, we develop a frequency analysis tool in MQL5 that bins price data into histograms, computes entropy for information content, and applies chi-square tests for distribution goodness-of-fit, with interactive logs and statistical panels for market insights. We integrate per-bar or per-tick computation modes, supersampled rendering for smooth visuals, and draggable/resizable canvases with auto-scrolling logs to enhance usability in trading analysis.
Pair Trading: Algorithmic Trading with Auto Optimization Based on Z-Score Differences
Pair Trading: Algorithmic Trading with Auto Optimization Based on Z-Score Differences
In this article, we will explore what pair trading is and how correlation trading works. We will also create an EA for automating pair trading and add the ability to automatically optimize this trading algorithm based on historical data. In addition, as part of the project, we will learn how to calculate the differences between two pairs using the z-score.
Low-Frequency Quantitative Strategies in Metatrader 5: (Part 2) Backtesting a Lead/Lag Analysis in SQL and in Metatrader 5
Low-Frequency Quantitative Strategies in Metatrader 5: (Part 2) Backtesting a Lead/Lag Analysis in SQL and in Metatrader 5
The article describes a complete pipeline that uses data analysis for finding low-frequency lead/lag trading opportunities. It goes into building a cross-correlation-based Lead/Lag analyser step-by-step, with special attention to the most common errors beginners may commit while developing cross-asset diffusion queries. After screening dozens of cointegrated and correlated pairs, a trading candidate pair is chosen, and its tradeability is evaluated in a pure SQL backtest. Once it is qualified, the strategy is backtested on the MetaTester for parameter optimization. The Expert Advisor with respective backtest settings and optimization inputs is provided, along with Python and SQL scripts.
One-Dimensional Singular Spectrum Analysis
One-Dimensional Singular Spectrum Analysis
The article examines the theoretical and practical aspects of the singular spectrum analysis (SSA) method, which is an efficient method of time series analysis that allows one to represent the complex structure of a series as a decomposition into simple components, such as trend, seasonal (periodic) fluctuations and noise.
Predicting Renko Bars with CatBoost AI
Predicting Renko Bars with CatBoost AI
How to use Renko bars with AI? Let's look at Renko trading on Forex with forecast accuracy of up to 59.27%. We will explore the benefits of Renko bars for filtering market noise, learn why volume is more important than price patterns, and how to set the optimal Renko block size for EURUSD. This is a step-by-step guide on integrating CatBoost, Python, and MetaTrader 5 to create your own Renko Forex forecasting system. It is ideal for traders looking to go beyond traditional technical analysis.
Creating Custom Indicators in MQL5 (Part 11): Enhancing the Footprint Chart with Market Structure and Order Flow Layers
Creating Custom Indicators in MQL5 (Part 11): Enhancing the Footprint Chart with Market Structure and Order Flow Layers
This article extends the MQL5 footprint chart with market-structure and order-flow layers: volume-profile bars, point of control, value-area highlighting, stacked imbalance detection, absorption zones, and single-print/unfinished markers. We expand bar data structures, add functions for POC/value area, imbalance, and absorption, and build a fixed-order rendering pipeline. You will get ready-to-use inputs, metadata, and drawing utilities to integrate and customize these layers in your indicator.