Find us on Facebook!
Join our fan page

Use new possibilities of MetaTrader 5

Programming Articles on MQL5.com

Published article "Creating a Profit Concentration Analyzer in MQL5".

Creating a Profit Concentration Analyzer in MQL5

Net profit and win rate tell you how much a strategy made, not how the result is distributed. This article builds a native MQL5 script that reads your closed trades and measures profit concentration: the top-N trade share, the Gini coefficient of the winners, an outlier-dependence stress test that removes the best few winners, and the largest day against a prop-firm consistency limit. It combines these into one A+ to F score with recommendations, running inside MetaTrader 5.

Published article "Building a Hierarchical Market Structure Framework (Prototype) in MQL5 Using Modular Architecture and Event-Driven Design".

Building a Hierarchical Market Structure Framework (Prototype) in MQL5 Using Modular Architecture and Event-Driven Design

This article describes a prototype reusable market structure framework for MQL5, built with a clean modular architecture and an internal event queue. It shows how to detect swing points, classify break-of-structure and change-of-character events, maintain a deterministic market state, and persist data to CSV. The focus is entirely on software engineering, component separation, and extensibility, not on trading signals. The prototype is a foundation for further development, not a production-ready library.

Published article "Trust Your Backtest Data First: Building a Reproducible Historical Data Audit in Python for MetaTrader 5".

Trust Your Backtest Data First: Building a Reproducible Historical Data Audit in Python for MetaTrader 5

A reproducible, read-only Python audit for MetaTrader 5 that verifies history quality before any backtest. It exports M5 data from multiple terminals, detects gaps and synthetic bars by timestamp spacing, and reports coverage per year. The same deterministic strategy then runs on three broker feeds over a common window to quantify result drift and decompose it into spread, data/price, and trade effects.

Published article "Detecting Structural Breakpoints in Price Series Using CUSUM in MQL5 (Part 1): From Statistical Theory to a Working MQL5 Indicator".

Detecting Structural Breakpoints in Price Series Using CUSUM in MQL5 (Part 1): From Statistical Theory to a Working MQL5 Indicator

This article builds a sequential CUSUM breakpoint detector for MetaTrader 5, starting from the statistical construction and ending with a working indicator. It explains standardized log-returns, dual accumulators, the role of k and h, and the ARL₀ baseline from Siegmund. The code walkthrough covers buffer persistence, recalculation handling, idempotent chart objects, and a three-pass engine, so you can compile, attach, and use the detector to flag structural regime shifts earlier than fixed-window smoothers.

Published article "Market Microstructure in MQL5 (Part 8): Micro-Trend Strength".

Market Microstructure in MQL5 (Part 8): Micro-Trend Strength

Part 8 adds bar-by-bar micro-trend scoring for NQ M1. GetMicroTrendStrength() builds a continuous [-1, +1] composite from EMA alignment, ATR‑normalized price position, slope consistency, and volume, with a contradiction penalty to suppress alignment/price conflicts. Session-adaptive thresholds scale by Part 7 confidence to modulate signal frequency across regimes. Outputs include a seven-state label, a binary signal, and a persistence check, calibrated on 514 New York sessions (May 2024–May 2026).

Published article "From Basic to Intermediate: Random Access (II)".

From Basic to Intermediate: Random Access (II)

In this article, we will examine how two slightly different approaches can significantly affect the overall implementation strategy, both in performance and in disk I/O design, while helping to prevent compatibility issues between applications.

Published article "MetaTrader 5 Machine Learning Blueprint (Part 19): Bagging Regimes".

MetaTrader 5 Machine Learning Blueprint (Part 19): Bagging Regimes

We test AFML's claim that the sequential bootstrap decorrelates bagged trees on overlapping triple‑barrier labels by isolating two levers: draw count and draw rule. One decision identical tree is bagged under four row‑sampling regimes and evaluated on EURUSD 2022–2023 for draw uniqueness, between‑tree correlation, AUC, and calibration. Decorrelation comes almost entirely from throttling max_samples to average uniqueness; the sequential draw adds little. Out-of-bag inflation is largest under full-count sequential sampling.

Published article "Building an Interactive AnchorFlow Volume Profile Indicator (MTF) in MQL5".

Building an Interactive AnchorFlow Volume Profile Indicator (MTF) in MQL5

We implement an interactive, anchored multi-timeframe volume profile in MQL5 for MetaTrader 5. The indicator draws the current-timeframe profile on the main chart and a higher timeframe profile in a subwindow, both aligned by a draggable anchor and the visible range. You will learn keyboard-driven bin editing (E/S double-click), robust timeframe validation, viewport-aware updates, and object restoration to build a reliable, synchronized volume workflow.

Published article "Algorithmic Arbitrage Trading Using Graph Theory".

Algorithmic Arbitrage Trading Using Graph Theory

In this article, triangular arbitrage is presented as a problem of finding cycles in a directed graph, where the vertices are currencies and the edges are currency pairs with weight rates. Profitable cycle: product of weights >1. Our Floyd-Warshall and DFS algorithms find optimal currency exchange paths that return to the starting point with a profit.

Published article "Monochronic Trading (Part 1): How to Detect Broker Timezone and DST in MQL5".

Monochronic Trading (Part 1): How to Detect Broker Timezone and DST in MQL5

We describe an MQL5 framework that aligns entries with session rhythms and scheduled clock events. A script identifies the broker's time zone and DST by detecting NFP spikes on EURUSD and matching them to EU/US/AU transition dates, producing EA‑ready settings. Session-to-broker time conversion and 15-minute marks constrain execution. A multi‑timeframe AMA signal aggregates trends for strategy selection and optimization.

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.

Training a nonlinear U-Transformer on the residuals of a linear autoregressive model

Training a nonlinear U-Transformer on the residuals of a linear autoregressive model

The article presents an innovative hybrid system for forecasting exchange rates that combines a linear autoregressive model with a U-Transformer architecture for residual analysis. The system automatically switches between signal sources depending on their quality and includes complete trading logic with averaging/pyramiding strategies. The key advantage of this approach is that the neural network is trained on the residuals of the linear model, which simplifies the task and reduces the risk of overfitting. The implementation is done entirely in MQL5 and is ready for use in real trading with automatic adaptation to changing market conditions.

Published article "Market Simulation: Position View (V)".

Market Simulation: Position View (V)

Despite what was shown in the previous article, all of this may seem simple at first. In reality, several problems remain, along with many tasks that still need to be completed. You, dear reader, may imagine that everything is easy and straightforward. Out of inexperience, you may simply accept whatever is presented to you. And that is a mistake you should try to avoid. Even worse is trying to use something without truly understanding what exactly you are using. Beginners often pass through a copy-and-paste stage. If you do not want to remain stuck at that stage forever, you should learn how to use certain tools. One of the tools most often used by programmers is documentation. The second is testing, supported by log files. Here we will see how to do this.

Published article "From Basic to Intermediate: Random Access to Files (I)".

From Basic to Intermediate: Random Access to Files (I)

In today's article, we will explore random access to file contents for the first time. This applies to both writing and reading information stored in a file. However, since the topic is too broad to cover in a single article, we will limit ourselves here to an introduction to random access.

There are more than 3,120 articles published on site

Published article "Foundation Models for Trading (Part I): Porting Kronos to Native MQL5".

Foundation Models for Trading (Part I): Porting Kronos to Native MQL5

Kronos is a pretrained transformer that models OHLCV bars the way a language model predicts words. We reimplement its tokenizer/encoder and transformer block in native MQL5, export weights to flat .bin files, and remove Python from runtime entirely. Part 1 delivers preprocessing and BSQ tokenization plus a bit-for-bit verification harness against PyTorch, so you can run the encoder inside MetaTrader 5 with confidence.

Published article "Entropy-Based Market Efficiency Indicator in MQL5: Measuring Randomness in Price Returns Using Approximate Entropy".

Entropy-Based Market Efficiency Indicator in MQL5: Measuring Randomness in Price Returns Using Approximate Entropy

A rolling-window Approximate Entropy oscillator for MQL5, built without external dependencies. Covers the full mathematics of template matching, Chebyshev distance, and the Phi-function derivation before presenting a reusable CApEnCalculator class and a color-zoned subwindow indicator. Includes a synthetic-data verification script and an honest discussion of bias, parameter sensitivity, and computational cost.

Published article "Building a Synthetic Custom Symbol in MQL5 Using Multi-Symbol Price Averaging".

Building a Synthetic Custom Symbol in MQL5 Using Multi-Symbol Price Averaging

This article shows how to build a synthetic custom symbol in MQL5 by averaging OHLC data from multiple instruments into a single derived price series. It covers symbol collection and validation, custom symbol creation and configuration, timestamp alignment, historical reconstruction, and lightweight live updates. The result is a reusable method for creating synthetic instruments suitable for correlation analysis, index-style modeling, indicator development, and strategy testing.

Published article "Beyond the Clock (Part 4): Efficacy of Bars on Trending and Mean-Reversion Strategies".

Beyond the Clock (Part 4): Efficacy of Bars on Trending and Mean-Reversion Strategies

Does better return conditioning buy strategy performance? We hold bar count fixed across time, tick, tick-imbalance, and tick-runs on 60.5 million EURUSD ticks, then meta-label RSI, Bollinger, and ADX/DI entries and score with purged cross-validation. No family delivers a consistent edge; efficacy varies narrowly and the best case fails a permutation test. Readers learn how to control overlap, leakage, and multiple testing in bar studies.

Published article "Market Simulation: Position View (IV)".

Market Simulation: Position View (IV)

Here we will start bringing together different components or applications that were previously completely isolated from each other. Chart Trade, the mouse indicator, and the Expert Advisor had already been linked to one another, but there was still no way to directly display on the chart the positions open on the trading server, which are often managed using a cross-order system. From this point on, this becomes possible, opening the way for various ideas and future implementations. Although we are only beginning to put these components into operation, we already have a direction for further development.

Published article "From Basic to Intermediate: FileSave and FileLoad".

From Basic to Intermediate: FileSave and FileLoad

In today’s article, we will look at several ways to work with the FileSave and FileLoad library functions. Although many people consider them of limited use because of certain limitations or difficulties they create in specific scenarios, properly understanding how these two functions work can save us a great deal of effort at certain points. They are also an excellent way to work with log files.

Published article "Trading Robot Based on a GPT Language Model".

Trading Robot Based on a GPT Language Model

The article presents a complete implementation of TimeGPT, a specialized Transformer-based architecture for forecasting financial time series on the MetaTrader 5 platform. Adaptation of the attention mechanism to financial data, selective tokenization of price changes, hardware-aware optimizations, and advanced learning techniques are discussed. Included are practical testing results showing 87% forecast accuracy over a 24-bar horizon with a training time of 15 minutes on the CPU. We also present a ready-made trading EA with automatic retraining.

Published article "Custom Indicator Workshop (Part 4) : Automating UT Bot Alerts into a Trading Expert Advisor".

Custom Indicator Workshop (Part 4) : Automating UT Bot Alerts into a Trading Expert Advisor

This article shows how to build an MQL5 Expert Advisor around the UT Bot Alerts indicator. The EA reads custom indicator signals via iCustom() and CopyBuffer(), evaluates entries only on new bars, using the last closed candle at index 1, and enforces a one-direction-at-a-time model by closing opposite positions before taking new entries. It also adds optional ATR-based stop-losses, reward-to-risk take-profits, dedicated buy/sell execution functions, magic-number tracking, and basic backtesting for repeatable evaluation.

Published article "Creating an Interactive Portfolio Analyzer Dashboard with CCanvas in MQL5".

Creating an Interactive Portfolio Analyzer Dashboard with CCanvas in MQL5

This article presents a standalone Portfolio Analyzer dashboard implemented as an Expert Advisor for MetaTrader 5. It reads account deal history, reconstructs closed positions, and attributes results by magic number or normalized comment to deliver clear per-strategy metrics. The interface provides a vector equity curve, date filters, and strategy selectors, plus a Pearson correlation matrix to reveal strategy redundancy. You can attach it to a separate chart without modifying existing trading EAs.

Published article "Exponentially Weighted Covariance Matrix in MQL5: Building an Adaptive Correlation Monitor for Multi-Symbol EAs".

Exponentially Weighted Covariance Matrix in MQL5: Building an Adaptive Correlation Monitor for Multi-Symbol EAs

This article builds a constant-memory EW covariance engine and a chart heatmap for monitoring cross-symbol correlations in MQL5. CEWCovariance updates in O(N²) time per bar and exposes covariance/correlation accessors; CHeatmapRenderer shows a five‑symbol matrix with values and colors. You will learn λ-to‑window mapping, how to set a meaningful min_obs warm‑up, and how to size the variance guard epsilon for real FX M1 data.

Published article "N-BEATS Network-Based Forex EA".

N-BEATS Network-Based Forex EA

Implementation of the N-BEATS architecture for Forex trading in MetaTrader 5 with quantile forecasting and adaptive risk management. The architecture is adapted through bilinear normalization and specialized loss functions for financial data. Backtesting on 2025 data shows inability to generate profits, confirming the gap between theoretical achievements and practical trading performance.

Published article "From Option Chain to 3D Volatility Surface in MetaTrader 5".

From Option Chain to 3D Volatility Surface in MetaTrader 5

This article walks through creating an MT5 indicator that ingests option chains from native symbols or CSV, inverts prices to implied volatility via a hybrid Newton–Raphson/bisection method, and assembles a clean strike–expiry grid. It then renders a shaded, rotatable 3D surface with the platform's DirectX layer, enabling clear, in-terminal analysis of skew and term structure using live or file-based data.

Published article "Interactive Supply and Demand Zone Manager in MQL5 (Part III): Zone Analysis, Stateful Interaction, and Pending Event Management".

Interactive Supply and Demand Zone Manager in MQL5 (Part III): Zone Analysis, Stateful Interaction, and Pending Event Management

We extend the stateful supply and demand framework for MetaTrader 5 with a quantitative admission model and a dedicated interaction engine. Candidate zones are scored by structural symmetry, volume participation, and ATR‑normalized displacement, then classified into objective tiers. Admitted zones follow a deterministic lifecycle that tracks first touch, validates bounces, or confirms breakouts, with full telemetry for analysis and reproducibility.

Published article "Persistence Entropy as a Market Regime Indicator in MQL5".

Persistence Entropy as a Market Regime Indicator in MQL5

This article turns the verified TDA pipeline into a live MQL5 indicator. It reduces each price window to two persistence-entropy lines (H0 and H1), computes a normalized loop-strength metric with an adaptive percentile band, and places fade marks only when loop strength is high and price hits a window extreme. You can attach the indicator, read six buffers from an Expert Advisor, and tune key window, ranking, and performance parameters.

Published article "Building an Object-Oriented Order Block Engine in MQL5".

Building an Object-Oriented Order Block Engine in MQL5

The article presents a production-oriented Order Block engine for MQL5 packaged as an include class, it validates zones via displacement and market structure break, maintains mitigation state only on closed bars, and avoids heavy copies by passing data by reference. A diagnostic indicator plots zones, and an EA gates logic to new bars for stable performance and reproducible tests.

Published article "Encoding Candlestick Patterns (Part 4): Frequency Analysis for Double-Candlestick Structures".

Encoding Candlestick Patterns (Part 4): Frequency Analysis for Double-Candlestick Structures

This article extends single-candlestick analysis to ordered double-candlestick patterns using an MQL5 script. The script encodes candles into symbols, extracts every consecutive two-symbol sequence (treating Aa and aA as different), counts occurrences and percentages, and writes sorted frequency tables to a text file. Readers can quickly identify the most recurrent transitions by symbol, timeframe, and lookback for further statistical testing.

Published article "Neural network trading EA based on PatchTST".

Neural network trading EA based on PatchTST

The article presents the revolutionary architecture of PatchTST, a tailored transformer for financial time series analysis that breaks market data into 16-bar patches for efficient processing. We will discuss the full implementation of a trading robot in MQL5 covering everything from mathematical fundamentals and data structures to a ready-made EA with risk management and continuous learning systems.

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.

Building a Viewport SnR Volume Profile Indicator in MQL5

Building a Viewport SnR Volume Profile Indicator in MQL5

We build a Support and Resistance Volume Profile indicator that adapts to the current viewport in MetaTrader 5. You will learn viewport detection, dynamic SnR identification, zoom‑driven bin sizing, min‑max volume scaling, and fast on‑chart rendering controlled by OnChartEvent. This approach expresses the relative strength of SnR levels with volume, keeping the chart focused on actionable reaction zones.

There are more than 3,100 articles published on site

Published article "Analyzing the Hourly Movement of Trading Symbols and Their Spreads in MetaTrader 5".

Analyzing the Hourly Movement of Trading Symbols and Their Spreads in MetaTrader 5

The ProSpread seasonality index indicator with a Moving Average is a technical analysis tool that identifies seasonal patterns in price movements, analyzes price behavior during specific trading hours and is able to work with either a single instrument or a spread between two assets. It also visualizes the statistical probability of directional movements.

Published article "MQL5 Trading Tools (Part 40): Adding SQLite Persistence and Per-Timeframe Visibility to the Canvas Drawing Layer".

MQL5 Trading Tools (Part 40): Adding SQLite Persistence and Per-Timeframe Visibility to the Canvas Drawing Layer

We add SQLite persistence to the canvas tools, saving every drawing and the entire UI session per symbol, then restoring them on startup so the workspace resumes exactly where you left it. The article builds versioned object serialization, a load/save lifecycle with dirty writes, and a timeframe-visibility editor that drives render-time filtering. The toolkit also runs as an indicator, so it can sit alongside other indicators or an Expert Advisor.

Published article "Measuring What Matters (Part 2): Building the Covariance Matrix: Eigenvalue Decomposition and Risk Factor Analysis in MQL5".

Measuring What Matters (Part 2): Building the Covariance Matrix: Eigenvalue Decomposition and Risk Factor Analysis in MQL5

In Part 2, we introduce a reusable CCovarianceMatrix class that computes and stores a covariance matrix from raw return series using MQL5's native Cov() method. We verify symmetry, print a labeled matrix grid, and call Eig() to obtain eigenvalues and eigenvectors. Readers see how symbols co-move and which factors drive variance, enabling clearer portfolio diagnostics and reuse in scripts or EAs.

Published article "Building a Traditional Daily Pivot Point Indicator in MQL5".

Building a Traditional Daily Pivot Point Indicator in MQL5

This article develops a rule-based daily pivot point indicator in MQL5 that uses the previous trading day's high, low, and close values to generate pivot, support, and resistance levels. It details historical data retrieval, pivot computation, chart object management, configurable label rendering, and automatic level updates as new trading days begin. The completed indicator displays multiple historical pivot sessions on the main chart for technical analysis on daily and lower timeframes.

Published article "Market Simulation: Position View (III)".

Market Simulation: Position View (III)

In previous articles, we mentioned that sometimes we need to set a value for the ZOrder property. But why? The reason is that many pieces of code that add objects to a chart simply do not use, or more precisely do not define, a value for this property. The point is that I am not here to say what every programmer should or should not do, or how they should or should not write their code. I am here to show you, dear reader, and everyone who truly wants to understand how these processes work internally, what actually happens behind the scenes.

Published article "From Basic to Intermediate: Working with Files in the MetaTrader 5 Sandbox".

From Basic to Intermediate: Working with Files in the MetaTrader 5 Sandbox

Do you know what a sandbox is? Do you know how to work with it? If the answer to either of these questions is “no”, read this article to understand the basic operating principle of a sandbox. You will also understand why MetaTrader 5 uses a sandbox to protect the integrity of some of its internal data. The material presented here is purely instructional. Under no circumstances should you treat the application as a final product whose purpose is anything other than studying the concepts presented.

Published article "Strategy Configuration via External JSON Files in MQL5: Replacing Input Parameters with a Runtime Config Loader".

Strategy Configuration via External JSON Files in MQL5: Replacing Input Parameters with a Runtime Config Loader

The article presents CJsonConfigLoader and a typed SStrategyConfig that move EA inputs to a shared JSON file. A hand-written, quote-aware tokenizer parses a flat object without any DLLs. A hotkey triggers reload so all instances can pick up new lot size, SL/TP, and spread limits without reattaching the EA. On malformed input, the loader falls back to safe defaults and keeps the previous configuration.

Published article "OrderSend retries and circuit breaker in MQL5".

OrderSend retries and circuit breaker in MQL5

Volatile-market failures such as requotes, connection drops, and partial fills expose a common weakness in EAs: unclassified retries and no cumulative failure control. This article introduces CRetryExecutor with exponential backoff and explicit error classification, plus a three-state CCircuitBreaker with cooldown and half-open probes, unified in CExecutionGateway. You can plug it into an EA to stop futile retries, prevent duplicate submissions, and improve diagnostics.

Published article "Beyond GARCH (Part VIII): The MMAR Library And Putting it to Work in an Expert Advisor".

Beyond GARCH (Part VIII): The MMAR Library And Putting it to Work in an Expert Advisor

This article finalizes the MMAR project with a CMMAR facade class and a demo Expert Advisor for MetaTrader 5. The facade exposes a compact API—configure, Fit(), Forecast()—that wraps partition analysis, spectrum fitting and Monte Carlo simulation. You will learn how to load data, fit the model and obtain a volatility forecast, with diagnostics and status handling for robust use in EAs.

Published article "Market Simulation (Part 24): Position View (II)".

Market Simulation (Part 24): Position View (II)

In this article, I will show how to use an indicator to track open positions on the trading server in the simplest and most practical way possible. I am doing this step by step to show that you do not necessarily have to move all of this into an Expert Advisor. Many of you have probably become used to doing that for one reason or another. In fact, that is not really justified, because as this implementation evolves, it will become clear that you can create or implement different types of indicators for this purpose.

Published article "From Basic to Intermediate: Object Events (IV)".

From Basic to Intermediate: Object Events (IV)

In this article, we will complete what was started in the previous one: a fully interactive way to resize objects directly on the chart. Although many people imagine that creating something like this would require much deeper knowledge of MQL5, you will see that, using simple concepts and basic knowledge, we can implement a way to work with objects directly on the chart. This leads to a very interesting and quite compelling result.

Most read articles this week

Building a Viewport SnR Volume Profile Indicator in MQL5

Building a Viewport SnR Volume Profile Indicator in MQL5

We build a Support and Resistance Volume Profile indicator that adapts to the current viewport in MetaTrader 5. You will learn viewport detection, dynamic SnR identification, zoom‑driven bin sizing, min‑max volume scaling, and fast on‑chart rendering controlled by OnChartEvent. This approach expresses the relative strength of SnR levels with volume, keeping the chart focused on actionable reaction zones.

Feature Engineering for ML (Part 9): Structural Break Tests in Python

Feature Engineering for ML (Part 9): Structural Break Tests in Python

We present a production‑ready implementation of AFML Chapter 17 structural break tests. The module includes Chu-Stinchcombe-White (one-/two-sided), Chow-type DFC, SADF across six models (linear, quadratic, sm poly 1, sm poly 2, sm exp, sm power), plus QADF (q, v) and CADF (q), returning bar-indexed scalar features. We address the book snippets' scaling issues and argument‑order pitfall, and show how a fixed lookback (L=504) bounds SADF cost to O(L²) per bar for regime detection.

Training a nonlinear U-Transformer on the residuals of a linear autoregressive model

Training a nonlinear U-Transformer on the residuals of a linear autoregressive model

The article presents an innovative hybrid system for forecasting exchange rates that combines a linear autoregressive model with a U-Transformer architecture for residual analysis. The system automatically switches between signal sources depending on their quality and includes complete trading logic with averaging/pyramiding strategies. The key advantage of this approach is that the neural network is trained on the residuals of the linear model, which simplifies the task and reduces the risk of overfitting. The implementation is done entirely in MQL5 and is ready for use in real trading with automatic adaptation to changing market conditions.

There are more than 3,090 articles published on site

Published article "Building a Divergence System (Part II): Adaptive SuperTrend Custom Indicator".

Building a Divergence System (Part II): Adaptive SuperTrend Custom Indicator

The article upgrades SuperTrend by integrating a divergence engine (MPO4 or RSI) the dynamically reduces the ATR multiplier during weakening momentum. It covers the shrinking formula, non-repainting state propagation with dedicated buffers, and a step-by-step MQL5 implementation on the price chart. You will learn how to interpret arrows and line flips, adjust inputs, and apply the indicator for disciplined trailing and earlier confirmations.

Published article "Implementing a Circular Buffer Class in MQL5: Fixed-Memory Rolling Windows for Real-Time Indicator Calculations".

Implementing a Circular Buffer Class in MQL5: Fixed-Memory Rolling Windows for Real-Time Indicator Calculations

A templated CCircularBuffer class for MQL5 replaces the O(n) ArrayCopy array-shift pattern with O(1) insertion using a fixed-capacity ring buffer. The implementation is shown end to end and integrated into a rolling standard deviation indicator. Benchmarks across multiple window sizes compare both approaches and quantify the impact on real-time indicator calculations.

Published article "Automating Trading Strategies in MQL5 (Part 50): Turtle Soup Liquidity Sweeps".

Automating Trading Strategies in MQL5 (Part 50): Turtle Soup Liquidity Sweeps

We build an automated MQL5 program that trades Turtle Soup by fading false breakouts of the N-bar high and low. The article implements liquidity-sweep detection, confirmation closes back inside the level, sweep-depth and extreme-age filters, and an optional reversal-candle body check. It adds configurable dynamic or static stops, two take-profit modes, points-based trailing, and clear chart visuals, providing a ready baseline for backtesting and further customization.

Published article "Reimagining Classic Strategies (Part 22): Ensemble Mean Reverting Strategy".

Reimagining Classic Strategies (Part 22): Ensemble Mean Reverting Strategy

This article will illustrate to the reader how to implement a mean-reverting strategy for the EURUSD pair. The strategy follows contrarian trading rules. Our strategy implements a weekly moving average channel, with one moving average on the high-price feed and the latter on the low-price feed. We enter short positions when the price falls beneath the low moving average and long positions when the price rises above the high moving average. Additionally, we will export daily market data to build a simple ONNX model of the market to provide an additional filter for our entries. This provides the reader with a reproducible template for strategy development and backtesting.

123456789...96