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.
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.
Feature Engineering for ML (Part 14): Trend-Scanning Features in MQL5
A naive MQL5 port of trend-scanning features recomputes each candidate window per bar at O(H·L) cost. This article introduces CTrendScanningFeatures.mqh, which maintains three running sums per horizon and updates them in O(1) per bar, verified against a Python reference. The indicator exposes four causal buffers - window, slope, t_value, rsquared - at the confirmation bar and corrects a sign inversion present in the original backward labeling mode.
Online Machine Learning for Trade Signal Filtering in MQL5 (Part 1)
This article implements an online logistic‑regression trade filter in native MQL5 and integrates it into an EMA‑crossover EA with a closed‑trade feedback loop. It details the shared class, features, SGD update, persistence, and a read‑only probability view. Synthetic experiments cover multi‑seed separation, calibration, feature ablation, regime‑shift baselines, and hyperparameter sweeps. You get reproducible scripts and a walk‑forward protocol to validate the filter on your own instrument.
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.
How To Debug MQL5 Code in MetaEditor
This article is a practical walk-through of the MetaEditor debugger using a rolling z‑score indicator with two planted bugs: an off‑by‑one array access and a silent wrong‑denominator variance. We show how to set breakpoints, step through code, read the call stack, and inspect values in the Watch window. You will learn a repeatable method to catch both crashing index errors and tiny numerical biases that charts cannot reveal.
Developing Smart Chart Objects in MQL5 (Part 1): Building a Stateful Trendline Management Framework
This article details a practical framework for converting MetaTrader 5 trendlines from static drawings into managed runtime entities. It covers object discovery, event-driven synchronization of user edits, and confirmation logic based on ATR multipliers and closed candles. A central manager coordinates multiple lines and updates their visual state. Readers can implement consistent, extensible rules for detecting proximity, validating bounces, and confirming breakouts.
Building a Hidden Risk of Ruin Auditor in MQL5
Aggregate metrics alone do not reveal how a trade sequence manages risk. This MQL5 tool analyzes closed positions to flag four structural patterns: post-loss volume escalation, overlapping same-direction entries, asymmetric payoffs, and a classical risk-of-ruin figure. The results are merged into a configurable A-F grade with concise recommendations to guide further review.
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.
Beyond the Mean and Standard Deviation: A Robust Statistics Library for MQL5 Indicators
Price outliers distort indicators based on the mean and standard deviation. This article delivers a robust MQL5 library (RobustStats.mqh) implementing the median, 1.4826-scaled MAD, and Theil–Sen slope, plus three drop‑in indicators that replace Bollinger Bands, the linear regression channel, and the z‑score oscillator. A comparison overlay and a breakdown‑point measurement on EURUSD show how the robust instruments hold their shape when a single spike moves the classical ones.
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.
Neural Networks in Trading: Probabilistic Time Series Forecasting (Encoder)
We invite you to explore a new approach that combines classical methods and modern neural networks for time series analysis. The article provides a detailed explanation of the architecture and operating principles of the K²VAE model.
Fast Integration of a Large Language Model with MetaTrader 5 (Part II): Fine-Tuning on Real Data, Backtesting, and Live Trading by the Model
The article describes the process of fine-tuning a language model for trading based on real historical data from MetaTrader 5. The base model, which has only theoretical knowledge of technical analysis, is trained on a thousand examples of the real behavior of currency pairs (EURUSD, GBPUSD, USDCHF, USDCAD) over 180 days. After being trained using Ollama, the model begins to understand the specific characteristics of each instrument.
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.
Self Optimizing Expert Advisors in MQL5 (Part 18): Time Lagged Independent Components Analysis
We evaluate blind source separation for market noise control using FastICA applied to SMA-filtered, time-lagged OHLC features. The study compares classical and surrogate targets, measures accuracy across lags, tunes KNN models, and inspects residual structure with clustering. Models are exported to ONNX and integrated into an MQL5 Expert Advisor for testing. The result is a reproducible pipeline from data extraction to deployment.
Differential Search Algorithm (DSA)
The article discusses the Differential Search Algorithm (DSA), which simulates the migration of a superorganism in search of optimal living conditions. The algorithm uses a Gamma distribution to generate a pseudo-stable random walk and offers four strategies for selecting the direction of movement, along with three coordinate mutation mechanisms. How will this method perform?
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
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.
Building a Basket Order Manager in MQL5 for Correlated Position Groups
The article's system introduces CBasketManager: positions are grouped by a comment‑based basket ID, analyzed as a single snapshot, and controlled with a unified equity stop. CBasketScanner computes aggregate P&L and volume‑weighted pip performance; CBasketStopRegistry triggers coordinated closure on threshold breach; CBasketExecutor adapts to the broker's filling mode. A lightweight dashboard shows live legs, volumes, stops, and distances for faster basket decisions.
Foundation Models for Trading (Part II): Decoding, Autoregression, and an Exact KV-Cache
We complete the native MQL5 port of Kronos: the decoder, the predictor's decode_s1 and decode_s2 stages with their cross-attention traps, and the autoregressive loop that produces a multi-bar forecast. Then we profile and make it roughly 4.5x faster with an exact KV-cache and pre-transposed weights, verifying every stage against PyTorch.
Making Custom Indicators for Beginners (Part 1): SuperTrend Indicator
This article builds a robust SuperTrend indicator in MQL5 using ATR-based bands, a ratchet mechanism, and strict series indexing to avoid silent recursion errors and repainting on closed bars. We walk through buffer binding, ATR handle management, seeding, and arrow confirmation logic. A companion EA demonstrates practical integration
Developing a Terminal Manager (Part 3): Getting Account Information and Adding Configuration
We are adding to our web application the ability to retrieve and display information about the terminal instances’ trading accounts, including balance, profit, connection status, and other important details. We will also implement a flexible configuration system that lets you manage application settings via an external JSON file, and improve the user interface of the main page.
Feature Engineering for ML (Part 13): Trend-Scanning Features in Python
Trend-scanning supports both forward and backward windows, and the labeling default is unsafe for features: it looks ahead and boosts next-bar agreement well above chance on random walks. We provide a dedicated wrapper, get trend scanning features, that forces computational causal and returns only window, slope, t value, and rsquared. A second analysis quantifies errors introduced by the default log transform on signed series.
Neural Networks in Trading: Adaptive Periodic Segmentation (Conclusion)
We invite you to dive into the exciting world of LightGTS — a lightweight yet powerful framework for time-series forecasting, where adaptive convolution and RoPE encoding are combined with innovative attention mechanisms. In our article, you will find a detailed description of all components — from creating patches to the complex mixture of experts in the decoder — ready for integration into MQL5 projects. Discover how LightGTS takes automated trading to a whole new level!