Automating Chart Patterns in MQL5 (Part 2): The Double Top and Double Bottom

Automating Chart Patterns in MQL5 (Part 2): The Double Top and Double Bottom

We build a robust MQL5 detector for double tops and double bottoms that first confirms the H4 trend, then validates six conditions (point equality, neckline placement, ordering, width, height, and ATR‑based tolerances). The neckline break is timed on the chart's timeframe, and a three-state machine ensures each pattern trades once. The measured‑move target translates structure into clear exits.
Neural Networks in Trading: Decomposition Instead of Scaling (SSCNN)

Neural Networks in Trading: Decomposition Instead of Scaling (SSCNN)

In this article, we begin our exploration of the SSCNN framework — a modern architectural solution for time series analysis that combines accuracy, a structured design, and high computational efficiency. We will systematically examine its theoretical aspects, highlight the key differences from its predecessors, and begin the practical implementation of its basic components in the MQL5 environment.
Walsh Functions in Modern Trading

Walsh Functions in Modern Trading

The article discusses the application of Walsh functions in trading. We will explore the basic principles of using these functions to analyze financial markets, forecast prices, and make trading decisions. We will also discuss the advantages and disadvantages of these functions, as well as the prospects for their application in trading and technical analysis.
Combining 3D Bars, Quantum Computing, and Machine Learning into a Unified Trading System

Combining 3D Bars, Quantum Computing, and Machine Learning into a Unified Trading System

The article presents the full integration of the 3D-bar module into a quantum-enhanced trading system for forecasting the movement of currency pairs. The system combines stationary four-dimensional features, an 8-qubit quantum encoder, and CatBoost gradient boosting with 52+ features. The system is implemented in Python using MetaTrader 5, Qiskit, CatBoost, and optional integration with the Llama 3.2 LLM for interpreting forecasts.
Decoding Market Intent: Reading Structure, Liquidity, and Price Behavior

Decoding Market Intent: Reading Structure, Liquidity, and Price Behavior

We implement a five-stage MQL5 pipeline that quantifies market structure, liquidity interaction, and price behavior on four timeframes, then resolves them into a 0–100 Market Intent Score. Decision states (WAIT/WATCH/ACTION) are driven by explicit weights plus hard gates. The analytical core feeds a concise dashboard and, when AutoTrade is on, an execution layer with entry zones, invalidation and liquidity‑based targets.
Building Your Personal Expert Advisor (Part 2): Risk Management and Dynamic Lot Sizing

Building Your Personal Expert Advisor (Part 2): Risk Management and Dynamic Lot Sizing

This part implements risk-based position sizing for the EA. Lot size is derived from account balance, a chosen risk percent, and ATR-based stop distance, then confined and rounded to the broker's volume rules and minimum stop levels. An optional drawdown-aware layer reduces risk during equity declines. Readers get a reproducible sizing function that keeps per-trade risk consistent and orders acceptable to the server.
Neural Networks in Trading: Disentangling Structured Components (Encoder)

Neural Networks in Trading: Disentangling Structured Components (Encoder)

We invite you to explore the next stage in implementing the SCNN framework, which combines flexibility and interpretability, allowing structural components of a time series to be identified precisely. The article provides a detailed explanation of the mechanisms of adaptive normalization and attention, which ensure the model's resilience to changing market conditions.
First Fractal Breakout — Intraday Strategy, Expert Advisor and Backtesting

First Fractal Breakout — Intraday Strategy, Expert Advisor and Backtesting

This article develops a market‑structure‑driven intraday breakout system based on Bill Williams fractals. We define session bounds, derive volatility‑scaled stops, use fixed risk and take‑profit multipliers, and limit trades to one per direction. An MQL5 Expert Advisor, visualization and statistics, tick-level backtests, an ORB comparison, and a cross-asset forward test provide a complete, replicable workflow.
Price Action Analysis Toolkit Development (Part 81): Adding Persistent Historical Bookmarks to an MQL5 Navigator

Price Action Analysis Toolkit Development (Part 81): Adding Persistent Historical Bookmarks to an MQL5 Navigator

We introduce a persistent bookmark layer for the MetaTrader 5 History Navigator. Bookmarks capture a chart's symbol, timeframe, and historical position with a name and notes, write them to a CSV file, and reload them later without manual date entry. The implementation integrates bookmark management into the current navigation engine, enabling quick creation, selection, navigation, and deletion for efficient historical study.
Neural Networks in Trading: Disentangling Structured Components (SCNN)

Neural Networks in Trading: Disentangling Structured 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.
Reinforcement Learning Meets MetaTrader 5: A Complete Pipeline for Training, Validating and Honestly Evaluating a Gold Trading Bot

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.
Combining LLM, CatBoost, and Quantum Computing into a Unified Trading System

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.
Price Action Analysis Toolkit Development (Part 80): Building a History Navigator for MetaTrader 5

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.
Dendritic Cell Algorithm (DCA)

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

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.
Building a Position Lifecycle Manager in MQL5 (Part 1): The Foundation of Reusable Position Management

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.
Neural Networks in Trading: An End-to-End Multivariate Time Series Forecasting Model (GinAR)

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

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 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.
Hypothesis Testing for Trading Strategies — Proving Whether Your Edge is Real

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.
Implementing a Trade Throttle and Rate Limiter in MQL5

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.
Building a Compile-Time Unit Testing Framework in MQL5 Using Preprocessor Assertions

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)

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.
From Novice to Expert: Candlestick Momentum Confirmation for Classic Crossover Strategies

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

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

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.
Automating Chart Patterns in MQL5 (Part 1): The Multi-Timeframe Swing Structure Engine

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.
Measuring Market Efficiency with Lempel-Ziv Complexity

Measuring Market Efficiency with Lempel-Ziv Complexity

This article presents a compact MQL5 library for market-complexity analysis: LZ76 complexity and Normalized Compression Distance built on a SAX symbolizer, exposed through a simple facade and an efficiency indicator. It explains the discretization choices, normalization, and distance formulation, and validates the code with unit checks and an independent cross-check. You get a ready-to-use library and indicator, plus a disciplined way to interpret readings with a shuffle null and a direction check.
Designing a Partial Close Engine in MQL5 with Configurable Profit Ladders

Designing a Partial Close Engine in MQL5 with Configurable Profit Ladders

This MQL5 engine applies configurable profit ladders in R‑multiples to manage partial closes reliably. It prevents stranded remainders by rounding to lot step, computes close percentages from the original entry volume, and moves the stop to breakeven when configured. A supported filling mode is chosen automatically, and the download includes seven include files, a demo EA, and a verification script.
Institutional-Grade Multi-Currency Portfolio Engine in MQL5 (Part 1): Architecture of a Multi-Currency EA Framework

Institutional-Grade Multi-Currency Portfolio Engine in MQL5 (Part 1): Architecture of a Multi-Currency EA Framework

The article details a master–agent MQL5 framework that mitigates cross-symbol risk concentration. A single Portfolio Controller publishes risk limits and halt flags to Instrument Agents through shared channels and a readiness flag, while agents size orders only within the published budget. It contrasts global variables, named pipes, and files, and clarifies timer intervals and latency so data allocation may be up to one cycle stale without breaking coordination.
Python + LLM API + MetaTrader 5: Real-World Experience Building an Autonomous Trading Bot

Python + LLM API + MetaTrader 5: Real-World Experience Building an Autonomous Trading Bot

The article describes the development of an MVP prototype for an autonomous trading bot for MetaTrader 5 that uses large language models (LLMs) via the OpenRouter API to analyze the market and make trading decisions. A Python script retrieves historical OHLCV data, sends it to an LLM for technical analysis based on support/resistance levels and Price Action patterns, and then automatically places orders with specified stop loss and take profit levels.
MQL5 Bootstrap (III): Simplified Functions for Working with News

MQL5 Bootstrap (III): Simplified Functions for Working with News

This article presents a unified news model and a set of reusable MQL5 classes for working with the MetaTrader 5 Economic Calendar. You will retrieve, filter, and cache events by time, currency, country, and importance using a single interface across three providers: built-in calendar, CSV, and SQLite. The framework supports export/import, next/previous event lookup, and reliable strategy‑tester backtesting without changing trading logic.
Neural Networks in Trading: Probabilistic Time Series Forecasting (K2VAE)

Neural Networks in Trading: Probabilistic Time Series Forecasting (K2VAE)

We invite you to explore the original implementation of the K²VAE framework — a flexible model capable of linearly approximating complex dynamics in latent space. This article demonstrates how to implement key components in MQL5, including parameterized matrices and how to manage them outside standard neural network layers. This material will be useful for anyone looking for a practical approach to building interpretable time-series models.
Training Neural Networks on Oscillators Without Look-Ahead Bias

Training Neural Networks on Oscillators Without Look-Ahead Bias

The article describes an approach to trade labeling using oscillators for machine learning models. This eliminates look-ahead bias. It has been shown that this type of labeling does not lead to model overfitting, and the strategies continue to perform well over the long term.