Codes

Project Template Generator for MetaTrader 5

This script serves as a practical example of how developers can programmatically work with files using MQL5. One of its key objectives is to demonstrate effective project file organization, which is essential for developers working on large-scale systems or aiming to create portable, self-contained

Telegram integration made easy for MetaTrader 5

The goal is to make the function readily available for any Telegram integration task in MQL5 development. By adding this file to your CodeBase, you can simply include it in your Expert Advisors and call the function directly from the included module. This eliminates the need to redevelop the code

Articles

Building A Candlestick Trend Constraint Model (Part 12) Measuring Lower-Timeframe Trigger Quality for MetaTrader 5

This article extends the A‑B‑C‑D constraint model with a measurement layer. We capture confirmation timing, breakout beyond Candle C, and post‑signal MFE/MAE; aggregate results by A‑B relationship; and write one CSV row per completed D window while showing concise CCanvas comments. The separation of

Building A Candlestick Trend Constraint Model (Part 11): Revealing Lower-Timeframe Triggers Within Higher-Timeframe Candle Relationships for MetaTrader 5

This article develops an A-B-C-D candlestick constraint model for MetaTrader 5. Candles A and B establish a completed D1 relationship, Candle C supplies a historical M1 setup, and closed M1 candles inside the developing Candle D either confirm or invalidate the sequence. We implement the design as a

The MQL5 Standard Library Explorer (Part 18): Building a Multi-Symbol Indicator Cache for MetaTrader 5

The article introduces a centralized cache that serves indicators to multiple strategy nodes. It encodes full indicator identity in keys, stores Standard Library objects in CArrayObj entries, reuses matching instances, verifies readiness, refreshes data, and deletes each indicator on final release

The MQL5 Standard Library Explorer (Part 17): Building a Reusable Portfolio Manager with CArrayObj for MetaTrader 5

We present a multi‑symbol EA structure that moves symbol‑specific state into independently initialized CStrategyNode objects and manages them with CPortfolioManager. Using CArrayObj with FreeMode, Add(), At(), Delete(), Total(), and Clear(), the manager ensures safe ownership and isolation, while

How to Detect and Normalize Chart Objects in MQL5 (Part 6): Manipulating Chart Objects with MetaTrader 5 Agentic AI Assistant for MetaTrader 5

This article demonstrates how natural-language prompts generate MQL5 producer programs that place native chart objects, and how a deterministic Expert Advisor (AIObjectTrader) reads them through a structured naming and geometry contract. We compare indicator and script routes, using three cases

How to Test and Customize Built-in MQL5 Programs: Envelopes with Alligator Strategy for MetaTrader 5

Envelopes define percentage boundaries around a moving average, but a boundary touch alone does not identify whether the market is trending or ranging. We build Envelope_Alligator_Strategy.mq5, a custom indicator that reads the built-in Envelopes and Alligator buffers. Ordered Alligator lines

How MQL5 Lite MCP AI Assistant Changed My Debugging Approach on Generated MQL5 Codes for MetaTrader 5

This article presents a practical debugging workflow with MetaEditor's integrated AI Assistant and a comparison to the previous external approach. We fix a controlled set of syntax and API errors in a D1 PriceMarker EA, inspect modifications, and recompile. The result is validated in the Strategy

Overcoming Accessibility Problems in MQL5 Trading Tools (Part VII): MetaTrader 5 Model Context Protocol (MCP) the Grand Solution for MetaTrader 5

Many traders know what they want to analyze or automate but cannot navigate MetaTrader 5, use MetaEditor, or translate an idea into working MQL5 code. This article shows how the AI Assistant and MCP turn one natural-language prompt into a complete workflow: strategy development, editing, debugging

From Novice to Expert: Trading Multi-Symbol Basket for MetaTrader 5

The article develops a multi-symbol basket EA that standardizes prices, derives PCA weights with native MQL5 matrices, forms a synthetic spread, and trades z-score deviations from a rolling mean. It validates symbols and synchronized history, stabilizes component orientation, maps signed weights to

The MQL5 Standard Library Explorer (Part 16): Building a Regime-Adaptive Expert Advisor for MetaTrader 5

We convert the Part 15 decision‑forest classifier into a regime‑adaptive Expert Advisor that decouples statistical inference from trading authority. The EA trains on completed bars, scores each new completed bar, and confirms stable bullish, neutral, or bearish regimes before acting. It then applies

Forum

What could the trading world become if EAs and custom indicators were able to run on mobile platforms?

In my opinion, I believe this could result in higher trading activity and increased EA sales for developers due to the large number of mobile users. According to some research on Google: 95.8% use mobile phones to access the internet. By comparison, almost 62.9% use laptops or desktops (Source