Market Simulation: Position View (VIII)
In the previous article, we considered how to implement a position indicator that allows you to close an open position directly from the chart by interacting with an object available on the chart. After completing and testing the first mechanism, we began making changes to ensure that take-profit and stop-loss levels could be removed for an open position. However, since the necessary changes required detailed explanations, in that same article I showed only the changes that needed to be made to the expert advisor; I still needed to show the changes that needed to be made to the position indicator.
Neural Networks in Trading: Unraveling Structural Components (SCNN)
We invite you to explore the innovative SCNN framework, which takes time series analysis to a new level by clearly separating data into long-term, seasonal, short-term, and residual components. This approach significantly improves forecasting accuracy by allowing the model to adapt to complex and changing market dynamics.
From Basic to Intermediate: Like Bubbles
This article will explain a very simple and easy-to-understand mechanism whose purpose is to sort any array. In it, we will see that the result obtained does not always meet expectations, so the implementation itself will need to be adapted to achieve the desired results.
Survival Analysis for Trade Exits: A Discrete-Time Competing-Risks Model in MQL5
Fixed exits ignore state changes while a trade is open. We implement a discrete-time competing-risks model entirely in MQL5, estimate cause-specific hazards for take-profit and stop-loss via Newton–Raphson on a person-period dataset with time-varying features, and turn cumulative incidence into a bar-by-bar hold-or-close rule, then test it against fixed take-profit/stop-loss with identical entry logic.
Reinforcement Learning Meets MetaTrader 5: A Complete Pipeline for Training, Validating and Honestly Evaluating a Gold Trading Bot
This article presents a complete RL trading pipeline for XAUUSD: a supervised signal baseline with triple-barrier labels, PPO training, purged walk-forward validation with embargo, multi-seed checks, and contract-guarded deployment with normalization. It includes runnable code for data validation, features, environment, training, and broker‑based reconciliation. The live demo over 763 closed trades showed no statistically significant edge, and the methods highlight where information and costs, not architecture, set performance limits.
Dandelion Optimizer (DO)
The Dandelion Optimizer (DO) turns the simple flight of a seed carried by the wind into a mathematical search strategy. The three phases — vortex rising, drift toward the center of the population, and landing along a Lévy-flight trajectory — form an elegant metaphor that yields interesting results in practice.
Market Simulation: Position View (VII)
In this article, we'll start making some improvements to the position indicator so that we can interact with it and modify price lines or close a position directly through the position indicator. Before we move on to the implementation, there are a few things worth clarifying, especially for those who aren't familiar with this. The indicator cannot be used in any way to change anything on the trading server. This is because MetaTrader 5 has a security system in place that allows only Expert Advisors to modify orders and positions. No application other than an Expert Advisor can manipulate orders or positions.
Combining LLM, CatBoost, and Quantum Computing into a Unified Trading System
The article proposes a synthesis of new technologies to overcome the limitations of classical indicators in market data analytics. It shows how language models and quantum encoding can reveal hidden market patterns that traditional methods overlook. The experiment confirms the value of new technologies and proposes an updated analysis methodology aligned with the current state of computational innovation.
From Basic to Intermediate: Navigating the Sandbox
In this article, we'll look at two ways to inspect the contents of the sandbox and even interact with it, using MetaTrader 5 as the base platform. Understanding the material in this article is essential to understanding what will be covered in subsequent articles.
MetaTrader 5 Machine Learning Blueprint (Part 20): Denoising, Detoning, and Clustering the Feature Correlation Matrix
Raw feature correlations contain estimation noise and a shared market-mode component that distort clustering. We fit the Marcenko–Pastur noise ceiling (with an effective sample size correction), apply constant-residual denoising and market detonation, and run the Optimal Number of Clusters routine. The result is a cleaned correlation matrix and stable cluster labels that avoid substitution effects and feed clustered MDI/MDA in the next article.
Building a Hull Moving Average Momentum Oscillator in MQL5
This article builds a Hull Moving Average Momentum indicator in MQL5 by combining raw price momentum with Hull MA smoothing. We compute momentum as the close-to-close difference over a user-defined length, form 2×Fast WMA − Slow WMA, then apply a final WMA with a square‑root period. The implementation covers inputs, buffers, warm-up/recalculation, and visualization with a color-coded line and zero-line filling, helping interpret positive/negative momentum without treating zero crossings as signals.
Price Action Analysis Toolkit Development (Part 80): Building a History Navigator for MetaTrader 5
We implement a History Navigator for MetaTrader 5 that jumps the chart to an exact historical period by date and time. The dialog validates inputs, converts them to datetime, and searches bar times with a binary-search routine before centering the selected candle. The navigation logic is separated from chart control, improving testability and maintenance, and a one-click return restores the live market view.
Creating a Cairo-Inspired Graphics Library for MetaTrader 5 (Part 1): Why the terminal needs its own 2D-renderer Contents
This article opens a step-by-step 2D graphics engine for MetaTrader. It standardizes ARGB colors and implements a reusable surface: a uint pixel buffer uploaded as a dynamic resource and shown via one OBJ_BITMAP_LABEL. You will draw rectangles and a vertical gradient, check real transparency, and learn an efficient update path with a single Flush call.
Neural Networks in Trading: An End-to-End Multivariate Time Series Forecasting Model (Conclusion)
We are pleased to present the final part of our series on GinAR — a neural network framework for time series forecasting. In this article, we analyze the results of testing the model on new data and assess its robustness under real-market conditions.
Dendritic Cell Algorithm (DCA)
The Dendritic Cell Algorithm (DCA) is a metaheuristic inspired by the mechanisms of the innate immune system. Dendritic cells patrol the search space, accumulate signals about the quality of positions, and reach a collective decision: whether to exploit what they have found or to continue exploration. Let's take a look at how a biological model for detecting pathogens is transformed into an optimization algorithm.
Isolation Forest: Unsupervised Anomaly Detection, and What It Actually Finds in Price Data
This article implements a self-contained Isolation Forest library for MetaTrader 5 with no labels, no distribution assumptions and no external dependencies. It details a reproducible 64‑bit generator, tree/forest construction, scoring and feature design, then verifies results against Python and market data with two null models. The package includes an indicator that plots the decision variable and a gate example. Readers get a validated library, clear limits of applicability and a practical way to calibrate thresholds.
Neural Networks in Trading: An End-to-End Multivariate Time Series Forecasting Model (Key Components)
We invite you to explore a new implementation of the key components of the GinAR framework — an adaptive algorithm for working with graph-structured time series. This article provides a step-by-step breakdown of the architecture and the algorithms for the forward pass and error backpropagation.
Building a Visual Position Planning Tool for MetaTrader 5
This article develops a visual position planning tool in MQL5 for evaluating trade setups before execution. The tool utilizes interactive Entry, Stop-Loss, and Take-Profit lines to calculate the stop distance, risk amount, estimated position size, potential reward, and risk-to-reward ratio directly on the chart. It supports market, limit, and stop order scenarios while keeping the focus strictly on planning and analysis rather than trade execution.
Building a Position Lifecycle Manager in MQL5 (Part 1): The Foundation of Reusable Position Management
A state-driven Position Lifecycle Manager brings structure to post-entry trade handling in MetaTrader 5. It discovers open positions, tracks them via managed objects, applies ATR-based protection, executes break-even transitions, and removes completed trades, with a clear NEW → PROTECTED → BREAKEVEN → CLOSED flow. The article shows integration with the standard MACD EA to enable reuse across strategies.
Deterministic Dendritic Cell Algorithm (dDCA)
The article presents an adaptation of the Deterministic Dendritic Cell Algorithm (dDCA) for continuous optimization problems. The algorithm, inspired by the immune system's Danger Theory, uses a signal accumulation mechanism to automatically balance exploration and exploitation within the search space.
Neural Networks in Trading: An End-to-End Multivariate Time Series Forecasting Model (GinAR)
We invite you to explore an innovative approach to forecasting time series with missing data using the GinAR framework. The article demonstrates the implementation of key components using OpenCL, which ensures high performance. In our next publication, we will take a detailed look at how to integrate these solutions into MQL5. This will help understand how to apply the method in practice in trading.
Network Momentum for MetaTrader5: Trading the Lead-Lag Graph Between Markets
This article builds a trend-following Expert Advisor that trades momentum spillover across markets, implemented fully in MQL5 without external solvers. It detects leaders with Derivative Dynamic Time Warping, learns a sparse weighted network by convex optimization, and propagates momentum through it with a reverting response. Readers get a step-by-step, reproducible pipeline and a working EA ready to run in the Strategy Tester.
A Reusable Breakeven Manager in MQL5 with Spread Compensation
A robust breakeven implementation for MQL5 is built around live spread sampling and correct pip-to-price conversion by symbol digits. CBreakevenManager moves SL to open_price ± spread ± buffer once a real‑pip activation threshold is reached and prevents duplicate modifications. A demo EA shows the behavioral difference versus a naive breakeven, and a script verifies core calculations.
Quantum Computing and Gradient Boosting in EURUSD Trading
The article describes the practical implementation of a hybrid algorithmic trading system that combines quantum computing (IBM Qiskit) and gradient boosting (CatBoost) to predict movements in the EURUSD pair on the hourly time frame. The system extracts four unique quantum features from a probability distribution across 256 states using eight qubits and, in combination with classical indicators and delta encoding of time categories, achieves 62% accuracy on 15,000 candlesticks.
Motifs and Discords: Building a Matrix Profile from Scratch
We build the Matrix Profile for MQL5 from the ground up and keep it numerically stable on real prices. The library includes rolling statistics, a radix-2 FFT powering MASS, and a STOMP self-join, with results matched to stumpy. A compact facade, an indicator that draws the profile and flags discords, and a demonstration Expert Advisor show how to read and use the signal in practice.
Hypothesis Testing for Trading Strategies — Proving Whether Your Edge is Real
Net profit and win rate do not tell you if a strategy's edge is statistically real. This MQL5 toolkit analyzes return series built from price data or deal history and reports t‑statistics, p‑values, and confidence intervals using one-sample and Welch t‑tests, the Mann–Whitney U test, and volatility‑regime analysis to support evidence‑based trading decisions.
Controller Objects for Everything: Draggable Slider Control
The article details a complete MQL5 implementation of a draggable slider for controlling ranges on the chart. It introduces the CDragHandle class, private state, public APIs for dimensions, colors, range, and value, plus Refresh* and UpdateHandlePosition logic and event processing. A working example changes CHART_SCALE, demonstrating how to connect the control to platform properties.
Price Action Analysis Toolkit Development (Part 79): Extending the Indicator Search Panel with Dynamic Input Parameter Configuration
We integrate parameter configuration into the indicator search workflow in MQL5. A central repository describes each indicator's inputs, a dynamic dialog renders controls from those definitions, and the dialog validates entries and converts them to MqlParam. The chart launcher then creates the indicator with IndicatorCreate using the provided values. This streamlines attaching indicators with custom settings on the chosen symbol.
Implementing a Trade Throttle and Rate Limiter in MQL5
We build a trade throttle for MQL5 EAs using a token bucket with a priority queue to control order submission rate. Tokens refill at a configurable per‑second rate, allowing short bursts up to capacity and then enforcing sustained throughput. When the bucket is empty, requests are queued and later released by priority with FIFO tiebreaks. This keeps execution within safe limits without discarding valid signals under load.
Larry Williams Market Secrets (Part 17) : Detecting Oops Signals Using a Custom Indicator
This article implements an MQL5 custom indicator that detects Larry Williams Oops gap reversals and marks bullish and bearish arrows on the chart. It details configurable gap and validity thresholds, same-bar or later confirmation, first-fill-only logic, historical backfilling, and incremental updates so signals remain consistent on both history and newly completed bars.
Building a Gold Volatility Regime Monitor from Options Data in MQL5
A practical bridge from the options market into MetaTrader 5 for gold. We compute near-the-money implied volatility by solving Black-Scholes from quoted prices, compare it with 30-day realized volatility, and use the ratio as a regime proxy. A Python feed publishes the value, an MQL5 script consumes it with WebRequest, and a background service keeps a panel current and alerts on changes. Source code for all parts is provided.
Building a Compile-Time Unit Testing Framework in MQL5 Using Preprocessor Assertions
MQL5 lacks native unit testing, so utility bugs in lot sizing, pip value, and normalization often slip into production. This article presents a zero‑dependency framework built from preprocessor assertion macros, interface‑based suites, and a central runner/formatter. It runs as a script in OnStart, executes deterministic tests, and prints pass/fail summaries to the Experts tab to catch rounding, boundary, and error-handling defects before deployment.
Neural Networks in Trading: Probabilistic Time Series Forecasting (Conclusion)
We invite you to learn about the K²VAE framework and how the proposed approaches can be integrated into a trading system. You will learn how the hybrid Koopman–Kalman–VAE approach helps build adaptive and interpretable models. The article concludes with practical results from using the implemented solutions.
Distribution-Free Price Channels in MQL5: Quantile Regression by Iteratively Reweighted Least Squares
We build a rolling price channel by fitting the 0.1, 0.5 and 0.9 conditional quantile lines via IRLS with pinball loss, packaged as a reusable class and two MetaTrader 5 indicators. We verify in-sample coverage, examine quantile crossing, and compare the channel width with ATR, Bollinger and regression widths on matched horizons. Tests in the Strategy Tester show the edges are descriptive, while the normalized width works as a volatility/regime feature.
From Novice to Expert: Candlestick Momentum Confirmation for Classic Crossover Strategies
In this article, we refine a moving average crossover strategy with a momentum candle filter and an immediate retracement bar confirmation. When both conditions are met, a pending stop order is placed using a pivot-based stop loss and a 2R take profit. The complete MQL5 Expert Advisor code, finite-state-machine logic, and chart annotations are detailed.
Meta-Labeling the Classics (Part 3): Filtering and Sizing Bollinger Band Trades
Bollinger Band mean reversion degrades in trending regimes when ADX is high and bandwidth expands. We separate direction from trade selection with a two‑stage meta‑labeling pipeline: a gradient‑boosted secondary classifier trained with PurgedKFold on band‑specific features (BBP, BBB, bandwidth regime) outputs action probabilities that drive probability‑based bet sizing. The MQL5 implementation loads the ONNX model and applies position sizing within a two‑EA architecture to filter low‑quality band touches.
Implementing a Daily Loss Limit and Drawdown Circuit Breaker in MQL5
This article presents a circuit breaker for MQL5 that monitors combined daily P&L (realized plus floating) on every tick and compares it to a configured loss limit. On breach, it closes positions, cancels pending orders, and activates a HALTED state that blocks further order submission in the EA until server‑time midnight. The package provides a chart dashboard, a demo Expert Advisor, a verification script, and notes on extending the halt signal across EAs.
Larry Williams Market Secrets (Part 16): Detecting and Trading the Oops Gap Reversal Pattern
Learn how to build an MQL5 Expert Advisor that detects and trades Larry Williams’ Oops Gap Reversal pattern using objective gap rules and later-bar confirmation. The EA tracks setup expiration, prepares stop-loss and take-profit levels, supports manual or risk-based position sizing, executes market orders, and is evaluated through historical testing.
Does This Entry Filter Really Add Edge? A Block-Permutation Test in MQL5
An MQL5 analyzer reconstructs completed trades, records acceptance labels, and measures the accepted-minus-rejected mean net-profit difference. It benchmarks that statistic against individual permutations, equal-block permutations, and circular shifts while preserving the accepted count. Block-size sensitivity, CSV exports, and coordinated base/filtered passes separate statistical selection evidence from operational effects on profit, drawdown, and efficiency metrics.
Automating Chart Patterns in MQL5 (Part 1): The Multi-Timeframe Swing Structure Engine
This article presents CSwingEngine, a reusable MQL5 class that detects H4 swing highs and lows, labels them HH, LH, HL, or LL, and classifies market structure as trend or range. Swings are always computed on H4, regardless of the attached chart, and each point draws correctly on lower timeframes via native datetime anchoring. The engine exposes a clean interface to query the current trend and retrieve the swing array for context-aware pattern logic.