How to start with MQL5 - page 45

 

Forum on trading, automated trading systems and testing trading strategies

Where Do I start from?

Sergey Golubev, 2025.08.27 05:57

Introduction to MQL5 (Part 20): Introduction to Harmonic Patterns

Introduction to MQL5 (Part 20): Introduction to Harmonic Patterns

If you’ve been trying to understand this concept in depth, this article is for you. This particular article will introduce you to the concept, covering the structure of harmonic patterns along with the essential Fibonacci extension and retracement tools used to define them.

We will explore the essential elements of some of the most well-known harmonic structures, including the Gartley, Bat, Butterfly, and Crab patterns, as well as the precise Fibonacci measurements that define them. Since even a slight divergence can render the setup invalid, it is important to understand these ratios. The next article will concentrate on using this knowledge to programmatically apply it to MQL5, allowing for the automatic identification of both bearish and bullish harmonic patterns.


 

Forum on trading, automated trading systems and testing trading strategies

How to Start with MT5, a summary !

Sergey Golubev, 2025.08.28 08:49

Getting Started with MQL5 Algo Forge

Getting Started with MQL5 Algo Forge

The new MQL5 Algo Forge is more than just a list of your projects – it's a full-fledged social network for developers. You can easily track changes, maintain project history, connect with like-minded professionals, and discover new ideas. Here, you can follow interesting authors, form teams, and collaborate on algorithmic trading projects.  

MQL5 Algo Forge is built on Git, the modern version control system. It equips every developer with a powerful toolset for tracking project history, branching, experimenting, and working in teams. But how does it all work? In this article, we'll explain how to get started with MQL5 Algo Forge.


 

Forum on trading, automated trading systems and testing trading strategies

MetaEditor, Open AI and ChatGPT

Sergey Golubev, 2025.09.11 05:52

Moving to MQL5 Algo Forge (Part 1): Creating the Main Repository

Moving to MQL5 Algo Forge (Part 1): Creating the Main Repository

At the time this article is being written, the new repository is already available for use, but MetaEditor integration has not yet been completed. Thus, while MetaEditor remains the main development environment, developers are still limited to MQL Storage based on SVN.


 

Forum on trading, automated trading systems and testing trading strategies

MetaEditor, Open AI and ChatGPT

Sergey Golubev, 2025.09.12 05:08

Moving to MQL5 Algo Forge (Part 2): Working with Multiple Repositories

Moving to MQL5 Algo Forge (Part 2): Working with Multiple Repositories

In the first article, we began transitioning from the built-in SVN-based MQL5 Storage in MetaEditor to a more flexible and modern solution based on the Git version control system: MQL5 Algo Forge. The main reason for this step was the need to fully leverage repository branches while working on multiple projects or on different functionalities within a single project.

 

Forum on trading, automated trading systems and testing trading strategies

Where Do I start from?

Sergey Golubev, 2025.09.20 09:06

Introduction to MQL5 (Part 21): Automating Harmonic Pattern Detection

Introduction to MQL5 (Part 21): Automating Harmonic Pattern Detection

This article's distinctiveness is found in its approachable style for beginners and the way we simplify difficult ideas into manageable stages. Instead of overloading you with theory, we'll be working on a project-based strategy in which we create an Expert Advisor (EA) that recognizes the Gartley pattern automatically.

 

Forum on trading, automated trading systems and testing trading strategies

MetaEditor, Open AI and ChatGPT

Sergey Golubev, 2025.09.24 03:00

Moving to MQL5 Algo Forge (Part 3): Using External Repositories in Your Own Projects

Moving to MQL5 Algo Forge (Part 3): Using External Repositories in Your Own Projects

In the second part of our transition to MQL5 Algo Forge, we focused on solving one of the important challenges –working with multiple repositories. Using the combination of the Adwizard library project and the Simple Candles Expert Advisor, we encountered and successfully resolved issues mostly related to file inclusion paths and branch merging. We also tried to use MetaEditor tools (where possible) throughout the entire workflow, from creating a separate branch for fixes to merging it via a Pull Request. However, where MetaEditor functionality was not enough, we switched to the MQL5 Algo Forge web interface, an external Git client in Visual Studio Code, or Git console commands. This clearly demonstrated how even in individual development, you can apply Git best practices to maintain order and a clear history of changes within your project.

In this article, we finally turn to this promising, yet more complex, task: how to practically connect and use libraries from third-party repositories within MQL5 Algo Forge. And not "someday in the future" but right now, without waiting for further development of MetaEditor's repository tools.

 

The MQL5 Standard Library Explorer (Part 1): Introduction with CTrade, CiMA, and CiATR

The MQL5 Standard Library Explorer (Part 1): Introduction with CTrade, CiMA, and CiATR

The MQL5 Standard Library is the perfect embodiment of this principle. It is not a cryptic set of rules to be mastered, but rather a collection of powerful, pre-built tools designed to eliminate repetitive tasks. Think of it not as inventing the wheel from scratch, but as assembling a high-performance vehicle from expertly crafted parts. The library provides the puzzle pieces; your job is to join them to create a complete picture.

This article series is designed to be that guide. Whether you're a newcomer eager to build your first expert advisor or a seasoned pro looking to streamline your code, we will demystify the Standard Library. Our goal is to show you how to construct complex, robust trading systems with minimal boilerplate code, leveraging the work already done by MetaQuotes' developers.

The MQL5 Standard Library Explorer (Part 1): Introduction with CTrade, CiMA, and CiATR
The MQL5 Standard Library Explorer (Part 1): Introduction with CTrade, CiMA, and CiATR
  • 2025.09.24
  • www.mql5.com
The MQL5 Standard Library plays a vital role in developing trading algorithms for MetaTrader 5. In this discussion series, our goal is to master its application to simplify the creation of efficient trading tools for MetaTrader 5. These tools include custom Expert Advisors, indicators, and other utilities. We begin today by developing a trend-following Expert Advisor using the CTrade, CiMA, and CiATR classes. This is an especially important topic for everyone—whether you are a beginner or an experienced developer. Join this discussion to discover more.
 

Forum on trading, automated trading systems and testing trading strategies

Harmonic Trading

Sergey Golubev, 2025.09.25 05:31

Automating Trading Strategies in MQL5 (Part 33): Creating a Price Action Shark Harmonic Pattern System

Automating Trading Strategies in MQL5 (Part 33): Creating a Price Action Shark Harmonic Pattern System

In our previous article (Part 32), we developed a 5 Drives (5-0) pattern system in MetaQuotes Language 5 (MQL5) that detected bullish and bearish 5 Drives harmonic patterns using Fibonacci ratios, automating trades with customizable stop loss and take-profit levels, visualized through chart objects like triangles and trendlines. In Part 33, we develop a Shark Pattern system that identifies bullish and bearish Shark harmonic patterns using pivot points and specific Fibonacci retracements and extensions. This system executes trades with flexible entry, stop-loss, and multi-level take-profit options, enhanced by visual triangles, trendlines, and labels for clear pattern representation.

 

Automating Trading Strategies in MQL5 (Part 34): Trendline Breakout System with R-Squared Goodness of Fit

Automating Trading Strategies in MQL5 (Part 34): Trendline Breakout System with R-Squared Goodness of Fit

In our previous article (Part 33), we developed a Shark Pattern system in MetaQuotes Language 5 (MQL5) that detected bullish and bearish Shark harmonic patterns using Fibonacci ratios, automating trades with customizable take-profit and stop-loss levels, visualized through chart objects like triangles and trendlines. In Part 34, we create a Trendline Breakout System that identifies support and resistance trendlines using swing points, validated by R-squared goodness of fit and angle constraints, to execute trades on breakouts with dynamic chart visualizations.
Automating Trading Strategies in MQL5 (Part 34): Trendline Breakout System with R-Squared Goodness of Fit
Automating Trading Strategies in MQL5 (Part 34): Trendline Breakout System with R-Squared Goodness of Fit
  • 2025.09.26
  • www.mql5.com
In this article, we develop a Trendline Breakout System in MQL5 that identifies support and resistance trendlines using swing points, validated by R-squared goodness of fit and angle constraints, to automate breakout trades. Our plan is to detect swing highs and lows within a specified lookback period, construct trendlines with a minimum number of touch points, and validate them using R-squared metrics and angle constraints to ensure reliability.
 

Automating Trading Strategies in MQL5 (Part 35): Creating a Breaker Block Trading System

In our previous article (Part 34), we developed a Trendline Breakout System in MetaQuotes Language 5 (MQL5) that identified support and resistance trendlines using swing points, validated by R-squared goodness of fit, to execute breakout trades with dynamic chart visualizations. In Part 35, we create a Breaker Block Trading System that detects consolidation ranges, validates breaker blocks with swing points, and trades retests with customizable risk parameters and visual feedback.
Automating Trading Strategies in MQL5 (Part 34): Trendline Breakout System with R-Squared Goodness of Fit
Automating Trading Strategies in MQL5 (Part 34): Trendline Breakout System with R-Squared Goodness of Fit
  • 2025.09.26
  • www.mql5.com
In this article, we develop a Trendline Breakout System in MQL5 that identifies support and resistance trendlines using swing points, validated by R-squared goodness of fit and angle constraints, to automate breakout trades. Our plan is to detect swing highs and lows within a specified lookback period, construct trendlines with a minimum number of touch points, and validate them using R-squared metrics and angle constraints to ensure reliability.