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!
Bonobo Optimizer (BO)
The article presents the implementation and analysis of the Bonobo Optimizer algorithm, which is based on the unique behavioral characteristics of bonobos — their dynamic fission-fusion social structure and three mating strategies. What interesting features does this method have?
Low-Frequency Quantitative Strategies in MetaTrader 5 (Part 5): Pre-Backtest Evaluation of Machine-Learning-Generated Signals Through Formulaic Alphas
The article shows how to evaluate machine-learning alphas before a full backtest by expressing them as formulaic alphas. We compute Information Coefficient (IC), Rank IC, Information Ratio (ICIR), and t-statistics to quantify forecasting strength and stability. A MetaTrader 5 backtest illustrates differences versus execution-dependent tests, and a Python parser facilitates reproducible calculations and bulk screening.
Building a Crosshair Volume Profile Indicator in MQL5
We implement an interactive Crosshair Volume Profile indicator in MQL5 for MetaTrader 5. Using a right-click-and-drag crosshair, you select a chart region; the indicator then builds adaptive price bins, accumulates tick or real volume, detects the POC, and renders the profile on the chart. You will practice OnChartEvent()-driven interaction, cursor-to-time/price mapping, and price-source models (Close, Median, Typical, Weighted, OHLC4) for on-demand volume analysis.
Building a Dynamic ATR-Based Trend Channel Indicator in MQL5
This article develops a dynamic ATR-based trend channel indicator in MQL5 that responds to current market volatility. It derives True Range, applies a two-step ATR smoothing, and constructs adaptive upper and lower boundaries to track trend shifts. The tool also renders a trailing trend line, trend-colored candles, and reversal arrows, offering a usable code base for volatility-aware analysis and further indicator design.
Enhancing the MQL5 Portfolio Analyzer Dashboard: Active Mitigation, Data Exports, and AI Integration
This article delivers active drawdown monitoring, automated mitigation rules, Excel XML data export, and AI-assisted review for the Portfolio Analyzer dashboard. It visualizes strategy-level drawdowns over time, enforces limits by closing positions and optionally disabling AutoTrading, and generates structured spreadsheets from trade records. A hybrid MQL5-Python approach runs the external review script directly from the terminal, supporting practical risk control and transparent reporting.
CSV Data Analysis (Part 8): Building an SQLite Strategy Registry from Accumulated CSV Exports
Flat files work well at the start of an MQL5 research pipeline, but they hinder cross-run queries and provenance once the archive grows. We build a Python-based SQLite registry that ingests CSV exports with SHA-1 deduplication, records EA version and run timestamps, applies forward-only schema migrations, and indexes common filters. You get a structured query layer for fast lookups, robustness checks, and version comparisons across all campaigns.
Market Heat Map Indicator Based on Prime-Number Density
An innovative indicator based on prime number theory helps identify strong reversal levels that other traders overlook. Testing on 10 assets showed that reversals in mathematically significant zones occur 1.5 to 1.8 times more frequently. Five practical application scenarios with specific rules for filtering out false breakouts and making precise market entries.
Neural Networks in Trading: Adaptive Periodic Segmentation (Creating Tokens)
We invite you to embark on an exciting journey through the world of adaptive analysis of financial time series and learn how to turn complex spectral analysis and flexible convolution into real trading signals. You will see how LightGTS listens to the market rhythm, adapting to its changes through a variable-window stride, and how OpenCL acceleration can turn computation into a fast track to profitable decisions.
Trading Options Without Options (Part 4): More Complex Option Strategies
In this article, we will examine how to reduce risk (and whether it is even possible to do so) in option strategies where risk is initially unlimited. This applies to strategies based on writing options, i.e., range-bound strategies. We will also consider ways to lock in profits for option strategies based on purchasing options, i.e., trend-following strategies. As always, we will add new useful features to our Expert Advisor (EA) and improve the existing ones.
Learnable Curves, Not Weights: A Kolmogorov-Arnold Network from Scratch
This article builds a Kolmogorov–Arnold Network (KAN) in MQL5, where every edge carries a learnable B‑spline curve rather than a scalar weight. We construct the spline basis, assemble edges and a layer, and fit all coefficients by ridge‑regularized least‑squares in a single solve. The model is delivered as an indicator that visualizes the learned curves and an Expert Advisor that acts on the prediction, providing an interpretable, reusable codebase.
Bloch's Relative Moving Average (RMA) Framework Implementation In MQL5
We port Daniel Bloch's Relative Moving Average framework into a complete MetaTrader 5 system. Instead of smoothing price, the RMA measures where price sits inside its own recent distribution on a [0,1] fractile scale, and drives four cross-strategies with a regime-adaptive exit. Includes the engine, indicators, and a backtested Expert Advisor.
Trends and Traditions: Using Rademacher Functions in Trading
Although the functions we will discuss have been known for quite some time, their application in the field of trading remains terra incognita to this day. In this article, we will explore some of the opportunities these old-but-new functions offer for developing trading strategies and assess their potential.
Neural Networks in Trading: Adaptive Periodic Segmentation (LightGTS)
We invite you to learn about the innovative technique of adaptive patching — a method for flexibly segmenting time series while taking their internal periodicity into account. We will also look at an efficient encoding technique that preserves important semantic characteristics when working with data at different scales. These methods open up new possibilities for the accurate processing of complex, multiscale data characteristic of financial markets and significantly improve the stability and reliability of forecasts.
A Trailing Stop Engine in MQL5 Supporting Five Trail Methods Simultaneously
We implement CTrailingEngine, an interface-driven MQL5 engine that evaluates each registered position on every tick and applies one of five trailing methods: fixed-pip, ATR multiplier, Parabolic SAR, percentage-of-profit, or swing high/low. All methods share the ITrailMethod contract, so new trails plug in without engine edits. Strict improvement and a one-point guard block backward moves and no-change SLTP modifications.
Building Volatility Models in MQL5 (Part V): Implementing EGARCH as an Alternate Asymmetric Volatility Process
EGARCH models log-variance, avoiding the non-negativity constraints that can distort GARCH estimates and enabling a clear treatment of leverage asymmetry. The article provides a complete MQL5 implementation with logarithmic backcasting, simulation-based multi-step forecasting, and diagnostics including the Engle–Ng Sign Bias, Leverage Correlation, and Volatility Runs tests. Practical outputs include EGARCH Volatility, an Innovation Z-Score, and an Asymmetric Volatility Regime Oscillator to support regime analysis and strategy design.
Elite Crystal Evolution Algorithm (CEO-inspired): Practical Implementation
Experimental evaluation on standard benchmark functions reveals the advantages and limitations of directly adapting combinatorial algorithms. The article provides a detailed description of the ECEA algorithm's mechanisms and test results.
Feature Engineering for ML (Part 12): Fractal Features in MQL5
A direct MQL5 port of the fractal detector writes each pattern at its center bar, so a buffer read by an expert advisor holds a value that only existed n bars later. We implement CFractalFeatures.mqh with ProcessBar for bar-by-bar use and Compute for full-series recalculation, covering detection, strength scored against a fixed or volatility-scaled floor, an event-based support/resistance ring, and trend-filtered breakout signals. Output is eighteen buffers published at the confirmation bar, verified against the Python reference to within 1e-13.
Price Action Analysis Toolkit Development (Part 78): Extending the Indicator Search Panel with Symbol Selection in MQL5
We continue enhancing our modular indicator search panel by adding symbol selection capabilities. The implementation allows users to search for built-in indicators, choose a destination symbol, and attach the selected indicator without opening multiple charts or running separate Expert Advisor instances.
Measuring What Matters (Part 3): The Reconstruction Engine — Validating Risk Footprints with Matrix Algebra
This article performs a numerical verification of MQL5 eigendecomposition for a covariance matrix using the spectral theorem A = V Λ Vᵀ. It reconstructs the matrix with Diag(), Transpose(), and MatMul(), computes the residual and its Frobenius norm, and shows that deviations remain at floating‑point precision, with results printed to the Experts journal.
Detecting Structural Breakpoints in Price Series Using CUSUM in MQL5 (Part 2): Implementing the Detector as a Native MQL5 Indicator
This article benchmarks CUSUM_Breakpoint.mq5 against the Siegmund ARL₀ prediction on live‑like data. The empirical false‑alarm rate is about five times higher than theory for all tested symbols and timeframes, and confirmations show sensitivity to variance changes over mean changes. Practitioners should calibrate h and k on the target instrument's history and apply the signal to manage volatility regimes, not to infer directional shifts.
Neural Networks in Trading: An Intelligent Forecast Pipeline (Conclusion)
The article provides a fascinating look at how SwiGLU embedding reveals hidden market patterns, and how a sparse Mixture of Experts within a Decoder-Only Transformer makes forecasts more accurate at reasonable computational cost. We take an in-depth look at the integration of Time‑MoE into MQL5 and OpenCL, and provide a step-by-step guide to configuring and training the model.
Automating Terminal Startup for Service Tasks
The article explores the possibility of launching a terminal with a configuration file to perform automated routine tasks, programmatically handling such launches, and creating a fully-fledged system for auto-optimizing an EA using Windows OS tools.
How to Detect and Normalize Chart Objects in MQL5 (Part 5): Fibonacci in Focus
The article bridges automated placement with manual analysis for the Fibonacci family in MQL5. It scans charts, identifies user Fibonacci objects, and normalizes their level arrays, interaction flags, and visuals per object type while preserving coordinates. With manual-priority enforcement, Expert Advisors can evaluate both human and code-generated tools reliably, without duplicates or runtime indexing issues.
Machine Learning Without the Black Box: The Tsetlin Machine for Trading
This article builds a white-box classifier in MQL5 using the Tsetlin Machine. It learns human-readable AND-rules instead of weights, trains with integer state updates, and requires no external dependencies. You will assemble the automaton, clause, and multi-class voter, verify on XOR and other boolean tasks, booleanize indicators, label by forward ATR-scaled return, save the model to CSV, and view active rules on a live chart.
Building a Position Sizing Engine in MQL5 with Multiple Risk Models
The article presents a position sizing engine for MQL5 Expert Advisors that separates risk policy from lot conversion. Four models—fixed fractional, fixed monetary, ATR-based volatility scaling, and equity-curve scaling—share a CLotConverter that uses OrderCalcProfit() to measure real money per point. A unified CPositionSizer interface exposes CalculateLots(), making model changes straightforward while producing broker-compliant volumes across symbols.
From Novice to Expert: Weekend Gap Size Effect Research Using MQL5 and Python
The article provides a practical research setup for weekend gap analysis: MQL5 extracts precise pip‑based gaps and tracks fills, while Python performs statistical testing and visualization. You will compute fill rates by gap buckets, model fill probability with logistic regression, and assess time-to-fill via Kaplan–Meier curves. All steps are configurable and reproducible for EURUSD, GBPUSD, USDJPY and beyond.
Building a Future Swing Projection Indicator in MQL5
We implement a Future Swing Projection indicator in MQL5 that analyzes historical swing structure and estimates the next move from recent price behavior. It locates six alternating swing points, measures five completed legs, and uses their average distance to project a target five bars ahead. The indicator draws swing legs, a projection line, ATR‑based support and resistance zones, and a label with the projected price to keep the process rule‑based and reproducible.
Interactive Supply and Demand Zone Manager in MQL5 (Part IV): Trading Supply and Demand Zones
We extend the supply and demand framework with a strategy layer that converts zone interactions into decisions. Qualified zones pass sequential checks for interaction proximity, approach behavior, higher‑timeframe alignment, and price action before execution is handed to a dedicated trade manager. This architecture improves control, maintainability, and future extensibility without changing the underlying zone engine.
Neural Networks in Trading: An Intelligent Forecast Pipeline (Sparse Mixture of Experts)
We invite you to explore the practical implementation of a sparse mixture of experts block for time series in the OpenCL computing environment. This article provides a step-by-step explanation of how masked multi-window convolution works, as well as how gradient-based training is organized in the presence of multiple information streams.
Elite Crystal Evolution Algorithm (CEO-inspired): Theory
A new original population-based algorithm, ECEA, is presented. Inspired by the process of water freezing, it adapts ideas from the Crystal Energy Optimizer (CEO) algorithm, which uses graph-based search, for general optimization problems. The algorithm uses a dynamic elite group, three search strategies, and a periodic diversification mechanism.
Unified Multi-Timeframe Renko: Synthesizing the Market's Temporal Dimensions
The article presents an innovative concept for a multi-timeframe Renko chart that combines signals from four timeframes (M5, M15, H1, H4) into a unified synthetic instrument. The system creates a virtual symbol in MetaTrader 5 by using the EMA of each timeframe to generate a composite signal through three methods: simple average, weighted average, and consensus. The implementation includes ATR-based adaptive brick sizing, real-time operation, and full integration with MetaTrader 5.
Designing a Unified Order Execution Gateway Class in MQL5
This class provides one point of contact for trade operations in MQL5. It rounds and clamps lot sizes, validates SL/TP against the broker's minimum distance, resolves a compatible filling policy, and applies bounded retries for transient retcodes. Calls return a structured CGatewayResult instead of raw retcodes, simplifying error handling and maintenance across strategies.
From Novice to Expert: Systematic Profit Conservation Using Candle Range Theory
A hybrid exit engine for MQL5 replaces static TPs with CRT-derived structural levels. The CRT_ProfitConserve class secures a partial at the first level and then trails the remaining position by structural anchors rather than fixed pips. The article walks through the class API, essential methods, and example usage in EAs, providing a clear path to embed CRT-based exits into existing strategies.
Automating Trading Strategies in MQL5 (Part 52): The tCISD Model with SSMT and Quarterly Theory
We build a tCISD program in MQL5 that pairs Quarterly Theory cycles anchored to New York time with a correlated-symbol SSMT divergence to time reversals. The article shows how to map cycles and quarters, detect the cross-symbol sweep disagreement, and derive the tCISD level whose break confirms the change in delivery. You will get a working entry logic that arms on divergence and executes on a confirmation close or a retest.