Find us on Facebook!
Join our fan page

Use new possibilities of MetaTrader 5

History of MQL5.community development

The most popular trading robots and technical indicators, news signals, regular incoming ready-made MQL5 programs in CodeBase and the most discussed Forum topics.

Published article "Position Management: A Reusable Trade Journal with Live Maximum Adverse Excursion, Maximum Favorable Excursion, and R-Multiple Tracking in MQL5".

Position Management: A Reusable Trade Journal with Live Maximum Adverse Excursion, Maximum Favorable Excursion, and R-Multiple Tracking in MQL5

This article presents CTradeJournal, a self-contained MQL5 class for live tracking of open positions at tick frequency. It maintains MAE, MFE, and initial risk in money, calculates the R-multiple when a position closes, and writes a complete CSV record. The text explains the design choices, provides the implementation, and shows simple EA integration so you can analyze entries, stop placement, and outcome distribution.

Published article "CSV Data Analysis (Part 1): CSV Export Engine for MQL5 Multi-Core Optimizations".

CSV Data Analysis (Part 1): CSV Export Engine for MQL5 Multi-Core Optimizations

Multi-core optimization in MetaTrader 5 can silently drop results when parallel agents contend for the same CSV file. A reusable MQL5 export engine applies an iteration-based spin-lock to acquire the file handle reliably and append rows without loss. It persists custom metrics such as the Sortino Ratio, average trade duration, and signal-quality measures (lag and whipsaws) into a consolidated CSV for downstream analysis.

Published article "Exploring Regression Models for Causal Inference and Trading".

Exploring Regression Models for Causal Inference and Trading

The article explores the possibility of using regression models in algorithmic trading. Regression models, unlike binary classification, allow for the creation of more flexible trading strategies by quantifying predicted price changes.

New publications in CodeBase

Published article "Recurrence Network Analysis (RNA) in MQL5: From Recurrence Matrices to Complex Networks".

Recurrence Network Analysis (RNA) in MQL5: From Recurrence Matrices to Complex Networks

The article extends the MQL5 recurrence library to Recurrence Network Analysis (RNA) by treating recurrence matrices as adjacency matrices of undirected graphs. It implements core network metrics—clustering, transitivity, average path length, betweenness, assortativity, and density—and applies them in rolling windows for single-series RNA and Joint RNA (JRNA). A modular metrics engine and two indicators visualize the evolving network structure on MetaTrader 5 charts for practical time-series analysis.

Published article "How to Detect and Normalize Chart Objects in MQL5 (Part 2): Collecting and Structuring Data from Complex Analytical Objects".

How to Detect and Normalize Chart Objects in MQL5 (Part 2): Collecting and Structuring Data from Complex Analytical Objects

Manually drawn analytical object tools like Fibonacci tools, and Andrews Pitchforks are invisible to automated trading logic. This article extends a base detector to extract anchor points, level arrays, and geometric offsets from complex objects. You will implement a reusable collector that normalizes the raw chart data into structured memory arrays, ready for strategy decisions.

Published article "MQL5 Trading Tools (Part 35): Adding Channel, Pitchfork, Gann, and Fibonacci Tools to the Canvas Drawing Layer".

MQL5 Trading Tools (Part 35): Adding Channel, Pitchfork, Gann, and Fibonacci Tools to the Canvas Drawing Layer

We extend the canvas drawing layer from the previous part with seven new categories of multi-anchor analytical drawing tools, covering three channel variants, three pitchfork variants, three Gann tools, and the six Fibonacci tools. We work through how each tool encodes its geometry on the canvas, how derived handles let users reshape compound shapes coherently, and how shared helpers handle ray clipping, scanline filling, and anti-aliased arc rendering. By the end, we will have a full set of analytical drawing tools that live on the same interactive canvas alongside the basic line tools from the previous part.

Published article "Feature Engineering for ML (Part 5): Microstructural Features in Python".

Feature Engineering for ML (Part 5): Microstructural Features in Python

This article implements the Chapter 19 microstructure suite in afml.features.microstructure and explains a two-layer design for OHLCV-only and tick-augmented workflows. We cover Roll and Corwin–Schultz spread/volatility, Kyle's, Amihud's, and Hasbrouck's lambdas, VPIN, and bar‑level imbalance features, all in Numba‑accelerated kernels. A single np.searchsorted pass resolves bar boundaries, enabling prange parallelization and producing a bar‑indexed feature matrix ready for downstream ML models.

There are more than 53,120 products available in Market

The most downloaded free products:

Bestsellers in the Market:

Most downloaded source codes this month

  • XANDER Grid XAUUSD Bidirectional grid EA for Gold (XAUUSD). Ideal for ProCent accounts. Includes Daily Profit Target and Max Drawdown protection.
  • Prime Quantum AI — TRADE WITH AI (Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek, xAI Grok). Prime Quantum AI is an MT5 Expert Advisor combining a classical pre-filter (ADX + Alligator) with AI vision-based chart confirmation from major AI providers (Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek, xAI Grok). When the pre-filter detects a trend setup, the EA captures three adaptive- timeframe chart screenshots and sends them to the configured AI provider, which returns direction, confidence, stop-loss and take-profit. A trade is opened only when the AI confirms the pre-filter signal with sufficient confidence. Features: dual Standard Broker / Prop Firm risk modes, configurable lot sizing, optional martingale, multiple SL/TP modes, trailing stop, partial close, news/time/day/spread filters, draggable on-chart info panel, and fully exposed indicator parameters. Requires MetaTrader 5, WebRequest enabled for your provider's URL, and a valid API key. Provider auto-detected from key format.
  • Precision Sniper Precision Sniper is a multi-confluence MT5 indicator inspired by TradingView's top signal tools, grading every buy/sell signal (A+, A, B, C) based on EMA structure, RSI, MACD, ADX, VWAP, and volume alignment, with 8 presets, HTF bias confirmation, auto TP/SL levels, trailing stop, and a built-in backtest dashboard.

Most read articles this month

How to purchase a trading robot from the MetaTrader Market and to install it?

How to purchase a trading robot from the MetaTrader Market and to install it?

A product from the MetaTrader Market can be purchased on the MQL5.com website or straight from the MetaTrader 4 and MetaTrader 5 trading platforms. Choose a desired product that suits your trading style, pay for it using your preferred payment method, and activate the product.

How to Test a Trading Robot Before Buying

How to Test a Trading Robot Before Buying

Buying a trading robot on MQL5 Market has a distinct benefit over all other similar options - an automated system offered can be thoroughly tested directly in the MetaTrader 5 terminal. Before buying, an Expert Advisor can and should be carefully run in all unfavorable modes in the built-in Strategy Tester to get a complete grasp of the system.

There are more than 153,840 topics available on forum

16 new signals now available for subscription:

Kebun Forex
384% 313 trades
Growth:383.91%
Equity:400.39USD
Balance:400.39USD
BV Trade
217% 2722 trades
Growth:217.20%
Equity:6,407.28USD
Balance:6,407.28USD
ET2
80% 290 trades
Growth:79.87%
Equity:3,047.89USD
Balance:3,047.89USD
and 13 more...

4 new topics on forum:

and 1 more...
There are more than 2,950 articles published on site

Published article "Engineering Trading Discipline into Code (Part 7): Automating Equity Protection Through Governance Logic".

Engineering Trading Discipline into Code (Part 7): Automating Equity Protection Through Governance Logic

Automated trading systems often focus heavily on signal generation while neglecting the mechanisms required to protect capital during periods of stress. This article presents an Equity Governance Framework in MQL5 that monitors drawdown conditions, evaluates equity pressure, and dynamically controls trading activity through a state-driven risk management model. By combining drawdown analysis, cooldown logic, trade authorization, and execution restrictions, the framework demonstrates how trading discipline can be engineered directly into code using a modular and extensible architecture.

Published article "Neural Networks in Trading: Hierarchical Skill Discovery for Adaptive Agent Behavior (HiSSD)".

Neural Networks in Trading: Hierarchical Skill Discovery for Adaptive Agent Behavior (HiSSD)

In this article, we explore the HiSSD framework, which combines hierarchical learning and multi-agent approaches to create adaptive systems. We examine in detail how this innovative methodology helps uncover hidden patterns in financial markets and optimize trading strategies in decentralized environments.

Published article "Beyond GARCH (Part V): Fitting the Multifractal Spectrum in MQL5".

Beyond GARCH (Part V): Fitting the Multifractal Spectrum in MQL5

This article builds the Spectrum Fitter: from tau(q) we compute f(alpha) with a discrete Legendre transform, then fit Normal, Binomial, Poisson, and Gamma spectra under box constraints using BLEIC. The best model by SSE is selected, and its parameters (eg, alpha min, alpha max or alpha_0, gamma) become the cascade inputs for multifractal simulation.

Published article "Carry Trade Logic in MQL5: Building an EA That Factors Swap Rates Into Position Sizing and Holding Decisions".

Carry Trade Logic in MQL5: Building an EA That Factors Swap Rates Into Position Sizing and Holding Decisions

Most retail traders ignore overnight swap rates, but for long-term positions, these interest payments can make or break your strategy. This article shows you how to build a dynamic MQL5 module that retrieves real-time swap data and converts it into actual profit or loss in your account currency. You will learn how to program an Expert Advisor that automatically calculates if a trade is worth holding based on carry income and adjusts your position size to account for expected interest. It is a practical guide to turning a hidden cost into a mathematical advantage for your trading systems.

Published article "Exchange Market Algorithm (EMA)".

Exchange Market Algorithm (EMA)

The article presents a detailed analysis of the Exchange Market Algorithm (EMA) inspired by the behavior of stock market traders. The algorithm simulates stock trading, where market participants with varying levels of success employ different strategies to maximize profits.

The most downloaded free products:

More than 500 new charts published:

График GBPJPY, M15, 2026.06.08 21:39 UTC, FxPro Markets Ltd., MetaTrader 5, Real
GBPJPY, M15
Gráfico USDCHF, H4, 2026.06.08 21:32 UTC, Orbex Global Ltd, MetaTrader 4, Real
USDCHF, H4
Graphique XAUUSD, M30, 2026.06.08 02:09 UTC, Ultima Markets Ltd, MetaTrader 5, Real
XAUUSD, M30
There are more than 53,030 products available in Market

Bestsellers in the Market:

2 new topics on forum:

21 new signals now available for subscription:

Xauusd H1
332% 1113 trades
Growth:332.22%
Equity:20,433.18EUR
Balance:20,433.18EUR
Multi EA combo
329% 12340 trades
Growth:329.20%
Equity:2,142.72EUR
Balance:2,145.99EUR
Blackbull High Risk
92% 485 trades
Growth:92.48%
Equity:7,696.06AUD
Balance:7,696.06AUD
and 18 more...

Published article "Developing a Multi-Currency Expert Advisor (Part 28): Adding a Position Closing Manager".

Developing a Multi-Currency Expert Advisor (Part 28): Adding a Position Closing Manager

When running multiple strategies in parallel, you may want to periodically close all open positions and start the strategies over again. The existing code only allows this behavior to be implemented through manual intervention. Let's try to automate this part.

Published article "MQL5 Wizard Techniques you should know (Part 93): Using Suffix Automation and an Auto Encoder in a Custom Money Management Class".

MQL5 Wizard Techniques you should know (Part 93): Using Suffix Automation and an Auto Encoder in a Custom Money Management Class

For this article we switch to a custom MQL5 Wizard class implementation that explores Money Management. We are labelling our custom class ‘CMoneySuffixAE’ that we derive by combining the Suffix Automaton algorithm with an Autoencoder neural network. As always, this formulation is testable with MQL5 Wizard Assembled Expert Advisors that can be tuned with various entry signals and trailing stop approaches.

Published article "Price Action Analysis Toolkit Development (Part 71): Weekend Gap Structure Mapping in MQL5".

Price Action Analysis Toolkit Development (Part 71): Weekend Gap Structure Mapping in MQL5

The article delivers an object-based MQL5 implementation that detects weekend gaps from time discontinuities and renders them directly on the chart. It manages graphical objects, tracks state transitions (fresh, partial, reaction, filled), and preserves completed gaps as historical zones. The result is a reproducible framework for monitoring how price revisits and fills weekend gap structures.

Published article "Building an Object-Oriented Z-Score Statistical Arbitrage Engine in MQL5".

Building an Object-Oriented Z-Score Statistical Arbitrage Engine in MQL5

This article shows how to implement a production Z-Score engine in MQL5 using an object-oriented include file, the library computes a rolling mean and population standard deviation, exposes a shift parameter for historical queries, and avoids redundant tick work by running on bar close. An Expert Advisor executes rule-based entries at positive/negative sigma thresholds and closes on mean reversion; a custom indicator provides visual verification.

Published article "Neural Networks in Trading: Anomaly Detection in the Frequency Domain (Final Part)".

Neural Networks in Trading: Anomaly Detection in the Frequency Domain (Final Part)

We continue to work on implementing the CATCH framework, which combines the Fourier transform and frequency patching mechanisms, ensuring accurate detection of market anomalies. In this article, we complete the implementation of our own vision of the proposed approaches and test the new models on real historical data.

Published article "Market Simulation: Getting started with SQL in MQL5 (I)".

Market Simulation: Getting started with SQL in MQL5 (I)

In today's article we will begin studying the use of SQL in MQL5 code. We will also look at how to create a database. Or, more precisely, how to create a SQLite database file using the features built into MQL5. We will also see how to create a table, and then how to establish a relationship between tables by using primary and foreign keys. All of this, once again, will be done with MQL5. We will see how easy it is to create code that can later be migrated to other SQL implementations by using a class that helps hide the implementation being created. And, most importantly, we will see that at various points we may face the risk that something will go wrong when using SQL. This happens because, in MQL5 code, SQL code will always be placed inside a string.

Published article "Implementing a Breakeven Mechanism in MQL5 (Part 2): ATR- and RRR-Based Breakeven".

Implementing a Breakeven Mechanism in MQL5 (Part 2): ATR- and RRR-Based Breakeven

This article completes the implementation of ATR- and RRRR-based breakeven mechanisms in MQL5 and develops, from scratch, a class that makes it easy to switch breakeven modes without having to enter the parameters again. To evaluate the effectiveness of each breakeven type, several backtests are run, analyzing their advantages and disadvantages in the context of algorithmic trading.

New publications in CodeBase

  • Universal Breakout Study Universal Breakout Study is a research-focused Expert Advisor for MetaTrader 5 designed to analyze and optimize range breakout strategies. It provides flexible parameter testing, fast optimization, and a structured framework for validating trading ideas using historical data and forward testing.
  • Institutional Ornstein-Uhlenbeck Equilibrium Matrix An econometric price-space indicator that utilizes the Ornstein-Uhlenbeck stochastic process to mathematically estimate the asset's true driftless equilibrium and its speed of mean reversion.

The most downloaded free products:

13 new signals now available for subscription:

GOLD DUPLICATOR
348% 815 trades
Growth:348.03%
Equity:2,226.05USD
Balance:2,226.05USD
GOLD HUAT EA
225% 613 trades
Growth:225.26%
Equity:24,456.64USD
Balance:24,456.64USD
PeuEagleFox
215% 221 trades
Growth:214.58%
Equity:5,581.46BRL
Balance:6,188.68BRL
and 10 more...
There are more than 52,950 products available in Market

The most popular forum topics:

Bestsellers in the Market:

Most downloaded source codes this week

  • Quantum XAUUSD Silver Trader Multi-indicator EA for Gold (XAUUSD) and Silver (XAGUSD): RSI, ADX and MA signals, adaptive ATR trailing stop and built-in capital protection.
  • Prime Quantum AI — TRADE WITH AI (Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek, xAI Grok). Prime Quantum AI is an MT5 Expert Advisor combining a classical pre-filter (ADX + Alligator) with AI vision-based chart confirmation from major AI providers (Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek, xAI Grok). When the pre-filter detects a trend setup, the EA captures three adaptive- timeframe chart screenshots and sends them to the configured AI provider, which returns direction, confidence, stop-loss and take-profit. A trade is opened only when the AI confirms the pre-filter signal with sufficient confidence. Features: dual Standard Broker / Prop Firm risk modes, configurable lot sizing, optional martingale, multiple SL/TP modes, trailing stop, partial close, news/time/day/spread filters, draggable on-chart info panel, and fully exposed indicator parameters. Requires MetaTrader 5, WebRequest enabled for your provider's URL, and a valid API key. Provider auto-detected from key format.
  • MQL5 Programming for Traders – Source Codes from the Book. Part 1 The first chapter of the book introduces the MQL5 language and development environment. One of the new features introduced in the MQL5 language compared to MQL4 (MetaTrader 4 language) is support for object-oriented programming (OOP), which makes it similar to C++.

Most read articles this week

How to purchase a trading robot from the MetaTrader Market and to install it?

How to purchase a trading robot from the MetaTrader Market and to install it?

A product from the MetaTrader Market can be purchased on the MQL5.com website or straight from the MetaTrader 4 and MetaTrader 5 trading platforms. Choose a desired product that suits your trading style, pay for it using your preferred payment method, and activate the product.

How to Test a Trading Robot Before Buying

How to Test a Trading Robot Before Buying

Buying a trading robot on MQL5 Market has a distinct benefit over all other similar options - an automated system offered can be thoroughly tested directly in the MetaTrader 5 terminal. Before buying, an Expert Advisor can and should be carefully run in all unfavorable modes in the built-in Strategy Tester to get a complete grasp of the system.

1 new topic on forum:

More than 600 new charts published:

График Crude, H4, 2026.06.05 01:34 UTC, FXTM, MetaTrader 4, Demo
Crude, H4
Gráfico EURUSD., H4, 2026.06.05 20:45 UTC, Orbex Global Ltd, MetaTrader 4, Real
EURUSD., H4
График USDJPYb, M2, 2026.06.05 20:03 UTC, HF Markets (SV) Ltd., MetaTrader 4, Demo
USDJPYb, M2

The most downloaded free products:

There are more than 52,850 products available in Market

Bestsellers in the Market:

12 new signals now available for subscription:

XAUUSD 03
556% 648 trades
Growth:556.44%
Equity:1,130.05USD
Balance:1,130.05USD
BTC IA MT5
205% 135 trades
Growth:205.16%
Equity:92.45USD
Balance:92.45USD
Aether Max
30% 207 trades
Growth:30.30%
Equity:2,070.33USD
Balance:2,070.33USD
and 9 more...

4 new topics on forum:

and 1 more...
1...91011121314151617181920212223...680