Published article "Digital Signal Processing for Traders (Part 2): The Dominant Cycle, MAMA, and a Regime-Switching Expert Advisor".

In Part 2 we measure the market's dominant cycle using Ehlers' Hilbert-transform homodyne discriminator and wrap it as an indicator. We then build the MESA Adaptive Moving Average (MAMA) and its follower FAMA from that phase information. Finally, we combine MAMA/FAMA with the Even Better Sinewave to form a regime-switching Expert Advisor and test it on EURUSD in the Strategy Tester, giving you a complete, reproducible MQL5 implementation.
Published article "Execution Cost and Slippage Sensitivity Analyzer".

Backtests often understate spread, commission, and slippage. This MQL5 analyzer loads closing deals and simulates rising execution costs to measure robustness. It computes the breakeven cost per deal, the cushion over an assumed cost, the net profit and profit factor at that cost, and how many winners turn into losers, then summarizes the result with an A+ to F grade and targeted guidance.
Published article "Multi-Threaded Trading Robot with Machine Learning: From Concept to Implementation".

The article presents a step-by-step development of a multi-threaded trading robot with machine learning in Python and MetaTrader 5. The system architecture is considered – from data collection and creation of technical indicators to training XGBoost models with portfolio risk management. The implementation of data augmentation, feature clustering via Gaussian Mixture Models, and flow coordination for parallel trading of multiple currency pairs is described in detail.
Published article "A Symbol Metadata and Trading Hours Cache in MQL5: Eliminating Redundant SymbolInfo Calls in Multi-Symbol EAs".

This article presents CSymbolMetaCache, an MQL5 layer that preloads contract specifications and trading-session schedules for monitored symbols at EA startup and then serves typed getters from memory. It explains which properties are safe to cache versus dynamic ones, including the semi-dynamic tick value on cross-currency pairs, and implements an in-memory IsMarketOpen() evaluator. A benchmark quantifies latency reduction across a set of twenty symbols.
Published article "Broker Reality Check (Part 1): Why Your EA Works on a Demo and Breaks on a Client's Broker".

Your Expert Advisor runs clean on your demo, then throws errors on a client's broker and quietly stops trading - and the code never changed. What changed is the broker's rulebook. This first article of the Broker Reality Check series builds a diagnostic EA that reads every relevant symbol trading condition - filling policy, stops and freeze levels, volume step, trade mode, swap and the triple-swap day - and flags the ones that silently break EAs, in plain language. It shows a green/amber/red panel, prints a report and dumps every Market Watch symbol to CSV, so you see why an OrderSend fails (10030, invalid stops, invalid volume) before it costs you a trade.
The most downloaded free products:
Bestsellers in the Market:
New publications in CodeBase
- BlueMoon BlueMoon EA is an MT5 Expert Advisor that combines EMA Envelope entries with adaptive basket management, progressive position sizing, spread filtering, drawdown protection, and automatic trade recovery for hedging accounts.
- PRO SCREENER Take control of your trading performance with the Pro Dashboard Screener Designed for serious traders, this utility provides a clean, professional, and real-time overview of your account's health directly on your chart.
- Breakout Distance - Donchian channel with distance-to-trigger panel in ATR units Most channel indicators tell you where the breakout level is. This one tells you how far away from it you are, right now, in a form you can act on. The panel shows, for both the upper and the lower channel edge: the level itself the distance from the current price, in the symbol's own price units the same distance expressed in ATR units a proximity bar that fills as price approaches the trigger Why the ATR column matters. A distance of 8 dollars from a breakout means something completely different in a quiet Asian session than it does during a news release. Dividing the distance by the current ATR makes the number comparable across sessions, across volatility regimes and across symbols. A reading of 0.30 ATR means the same thing on gold as it does on EURUSD. Colour coding: normal text : more than InpNearATR away (default 1.0 ATR) gold : within InpNearATR orange red : within InpVeryNearATR (default 0.5 ATR)
- Draw On Liquidity + Kill Zone The Draw On Liquidity (DOL) indicator automatically plots these essential levels on your chart and highlights high-probability trading windows through session kill zones. With full customization options, it provides a clean, professional, and highly informative display to enhance your trading decisions.
Published article "The MQL5 Standard Library Explorer (Part 14): Building a Dynamic Hedge EA with the ALGLIB Port (ap.mqh)".

This article introduces ap.mqh, the ALGLIB port for MQL5, and demonstrates its use in multi‑asset workflows that require robust linear algebra. It covers why built-in indicators fall short, then implements polynomial regression, a rolling correlation matrix indicator, and an adaptive hedge ratio estimator using ridge regression with Cholesky. Practical code shows how to compute spread z‑scores and execute coordinated pairs trades entirely within MetaTrader 5.
Published article "Mapping Dealer Gamma Exposure (GEX) in MetaTrader 5: Walls, the Zero-Gamma Flip, and a Chart Overlay".

In this article we build a dealer gamma-exposure map in MQL5. From an option chain, the tool computes per-strike GEX, finds the call and put walls, and solves for the zero-gamma flip that separates a mean-reverting regime from a trending one, then draws it all on the chart. CSV and native-symbol data paths included.
Published article "Constructing a Trade Replay Engine in MQL5: Stepping Through Historical Trades Bar by Bar for Manual Review".

An MQL5 script reconstructs closed trades from raw deal history and replays them on the chart bar by bar, drawing entry, exit, stop, target, and an annotation with per‑trade statistics. Four classes separate concerns: a trade data record, history reconstruction with a two‑pass SL/TP lookup and partial‑close aggregation, chart rendering, and a controller with polling‑based keyboard navigation. This enables consistent, fast visual review of each trade in its original candlestick context.
Published article "Dingo Optimization Algorithm (DOA)".

The article presents a new metaheuristic method based on the hunting strategies of Australian dingoes: group attack, chase, and scavenging. Let's see how the Dingo Optimization Algorithm (DOA) performs algorithmically.
Published article "Online Linear Regression with Recursive Least Squares in MQL5: A Parameter-Free Adaptive Trend Estimator".

This article implements recursive least squares in native MQL5 with a constant O(1) update per bar, avoiding the per‑bar O(n) rebuild of a rolling OLS. It derives and codes the Sherman–Morrison rank‑1 update, explains the forgetting factor through its effective window, and provides a reusable class. Two coordinated indicators plot a 1‑step‑ahead price forecast on the chart and the signed slope in a correctly scaled subwindow for practical trend tracking.
The most downloaded free products:
Bestsellers in the Market:
Most downloaded source codes this month
- Functions to simplify work with orders All we want is to think about algorithms and methods, not about syntax and values how to place orders. Here you have simple functions to manage positions in MQL5.
- iS7N_TREND.mq5 Now it's two-color (or two-mode) trend indicator, the number of calculated bars can be specified.
- LotSize Calculation This is a simple script file to compute lot size either using risk percentage approach or the actual amount to risk.
Most read articles this month

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
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.
The most popular forum topics:
- [Rant] Whats with every application on the freelance section getting 20+ applications within a few minutes these days? 25 new comments
- Purchased an EA and its no longer available in Market Place. 20 new comments
- please help me developers ! how can i get job please because i am not getting it 12 new comments
New publications in CodeBase
- Asian Session Breakout / BhanuCodeLab Asian Session Breakout identifies the price range formed during the Asian trading session and monitors how price behaves after that session ends. The Asian High and Asian Low remain extended until the end of the broker trading day. This makes the range useful as an intraday support-and-resistance zone during the European and US sessions. A compact dashboard displays the current range values, configured session time, breakout status, breakout confirmation method, and confirmation timeframe. The indicator does not open or manage trades. It provides market structure and breakout information for discretionary trading or EA development.
- EA Money Management A simple indicator based on trend criteria
- Footprint XRay (Order Flow Volume Delta) An institutional-grade order flow and footprint chart indicator ported from Pine Script to MQL5. It dynamically deconstructs major timeframe bars using lower timeframe (LTF) historical tick/real volume to compute buy/sell volume delta at each price level. The indicator features automatic timeframe selection, Point of Control (POC) highlighting, Stacked Imbalances, extreme Absorption detection, Unfinished Business (UB) tracking with live mitigation, and real-time alert triggers.
Published article "How To Profile MQL5 Code in MetaEditor".

This article profiles a rolling z-score indicator with bands using MetaEditor's built-in sampling profiler. We read the Total CPU and Self CPU columns and follow the heat‑mapped source to the true hotspots, replace window rescans with sliding accumulators, remove a redundant array copy, and honor prev_calculated. The result is the same output with measured samples reduced from roughly 7,050 to 59.
Published article "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".

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".

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.
The most downloaded free products:
Bestsellers in the Market:
New publications in CodeBase
- Value Area Levels / BhanuCodeLab Value Area Levels is a session-based Value Area indicator for MetaTrader 5. It calculates and displays Value Area High, Point of Control, and Value Area Low levels for the developing, previous, and historical profiles.
- Interactive Supply and Demand Zone Trading Prototype This release introduces a lightweight automated trading prototype built on top of the Interactive Supply and Demand Zone Manager framework. The framework allows traders to draw and manage their own supply and demand zones, while each zone maintains its own lifecycle, interaction history, and evolving state as market conditions change. The hybrid approach combines user-defined zones with automated monitoring, validation, and trade management. The strategy evaluates qualified zones through a structured decision process before generating trade actions. Detailed logging provides visibility into zone behaviour, allowing traders to study interactions and build their own approaches using the collected information.
- Portfolio Correlation and Margin Risk Calculator Computes the historical Pearson correlation between any set of instruments and the combined margin your account would need to hold all of them at once, as a percentage of your equity. Runs natively in MetaTrader 5 with no external libraries, no Python, and no AI — set your symbol list and lot sizes as inputs and it reports the full matrix in the Experts tab and on the chart, refreshing on a timer.
Published article "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".

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)".

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".

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".

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.
























