Articles on the MQL5 programming and use of trading robots

icon

Expert Advisors created for the MetaTrader platform perform a variety of functions implemented by their developers. Trading robots can track financial symbols 24 hours a day, copy deals, create and send reports, analyze news and even provide specific custom graphical interface.

The articles describe programming techniques, mathematical ideas for data processing, tips on creating and ordering of trading robots.

Add a new article
latest | best
preview
Defining your Edge (Part 5): Using GARCH Variance and Volatility-Scaled LSTM in an Expert Advisor

Defining your Edge (Part 5): Using GARCH Variance and Volatility-Scaled LSTM in an Expert Advisor

We merge GARCH(1,1) variance projections with ATR plus Bollinger-Bands patterns to form an algorithm that could optionally be used with volatility-scaled LSTM within LSTM Wizard-ready signal class. We cover feature scaling, mode scoring, thresholds, and safety checks. Readers can replicate backtest/forward test results to verify if the recurrent layer gives incremental discrimination over our deterministic baseline.
preview
Neural Networks in Trading: Heterogeneity-Informed Meta-Parameter Learning (Conclusion)

Neural Networks in Trading: Heterogeneity-Informed Meta-Parameter Learning (Conclusion)

The article describes a practical implementation of the HimNet framework based on MQL5, ready for integration into automated trading. We demonstrate how heterogeneity-adapted meta-parameters transform the model into a universal tool capable of handling fluctuating volatility.
preview
Partial Information Decomposition: When Two Indicators Together Say More Than Either Alone

Partial Information Decomposition: When Two Indicators Together Say More Than Either Alone

We introduce a Partial Information Decomposition library for MQL5 that decomposes two sources about a target into four atoms: unique to each, shared, and synergy. The implementation uses quantile binning, tabulated logarithms, and a maximum-entropy fit (for I_ccs), and it pairs results with a block-permutation null because atoms sit above zero on finite samples. Use it to screen indicator pairs and judge significance, including family-wise correction.
preview
Defining your Edge (Part 4): Applying Isotonic Regression and PNN Price-Forecasting in an Expert Advisor

Defining your Edge (Part 4): Applying Isotonic Regression and PNN Price-Forecasting in an Expert Advisor

We consider the methods with which Isotonic Regression calibrates raw RSI, Stochastic and price-action signal scores into probabilities that are sorted, while a separate Probability based Neural Network evaluates similar historical market states. This article uses both approaches in a ready-made MQL5 custom signal class that is compatible with MQL5 Wizard and provides up to 7 selectable entry modes. Reproducible tests compare isotonic-only signals with the combined Isotonic-PNN model to assess whether the network adds useful information beyond the simpler baseline.
preview
Neural Networks in Trading: Heterogeneity-Informed Meta-Parameter Learning (Key Components)

Neural Networks in Trading: Heterogeneity-Informed Meta-Parameter Learning (Key Components)

In this article, we take a detailed look at the algorithms used to implement the key components of the HimNet framework. We demonstrate how, with a minimal number of trainable components, a high degree of consistency and controllability can be achieved throughout the entire system. The presented implementation is compact and transparent, which makes it easier to adapt to real-world market tasks.
preview
Defining your Edge (Part 6): Harnessing Fourier Transform and a Spiking Neural Network in an Expert Advisor

Defining your Edge (Part 6): Harnessing Fourier Transform and a Spiking Neural Network in an Expert Advisor

Article revisits Trading Robot that merged Discrete Fourier Transform with Leaky Integrate-and-Fire Spiking Neural Network. Evaluation is made over the seven operating modes with different symbols, timeframes, and test windows. We use two-thirds of the test window to optimize while the one-third does a forward walk run. This study tries to detail parameter interactions, input scaling, gating effects, and outlines practical checks that include rolling windows, frozen inputs, and others. The goal remains identifying settings worth further testing or paper trading.
preview
Developing a Reusable Dynamic Volatility Trailing Stop Engine in MQL5

Developing a Reusable Dynamic Volatility Trailing Stop Engine in MQL5

This article presents a modular, object-oriented volatility trailing stop engine for MQL5 packaged as a reusable include class, it calculates dynamic stop-loss levels using a True Range average filter on closed bars, supports step-based trailing, includes a visual diagnostic indicator, and provides an Expert Advisor execution template.
preview
Python-MetaTrader 5 Strategy Tester (Part 06): MQL5-Style Backtesting for Python Expert Advisors

Python-MetaTrader 5 Strategy Tester (Part 06): MQL5-Style Backtesting for Python Expert Advisors

Code and build Python-based trading robots just like MQL5 Expert Advisors (EAs). In this article, we develop a Python-based replica of the MetaTrader 5 Python package, providing methods that closely resemble those of MetaTrader 5 during simulation. This allows us to backtest Python EAs in a simplified environment, using an approach similar to developing and testing Expert Advisors in MQL5.
preview
Neural Networks in Trading: The Adaptive Graph Diffusion Model (Attention Module)

Neural Networks in Trading: The Adaptive Graph Diffusion Model (Attention Module)

In this article, we will take a detailed look at the practical implementation of the key components of the SAGDFN framework. We will show how sparse attention and the selection of significant neighbors are organized for time series forecasting. The approaches presented strike a balance between forecast accuracy and computational efficiency.
preview
Building AI-Powered Trading Systems in MQL5 (Part 11): Optimizing the UI with Frame Throttling and Partial Rendering

Building AI-Powered Trading Systems in MQL5 (Part 11): Optimizing the UI with Frame Throttling and Partial Rendering

We optimize an MQL5 canvas interface to stay responsive under rapid input without changing its appearance. The article adds a direct-buffer canvas for block region copies, caches text widths and glyph coverage, caps repaints at 60 fps (16 ms), and limits drawing to panes and regions that actually changed. As a result, hover, scroll, and popups render smoothly without full-panel redraws.
preview
Neural Networks in Trading: The Adaptive Graph Diffusion Model (Conclusion)

Neural Networks in Trading: The Adaptive Graph Diffusion Model (Conclusion)

In this article, we conclude our work on building the SAGDFN framework using MQL5, summarizing the development process and presenting the results of its practical testing. Let's combine the modules we've already implemented into a single system, highlight the strengths of this approach, point out its weaknesses, and discuss possible ways to improve it.