How to start with MQL5 - page 46

 

Automating Trading Strategies in MQL5 (Part 36): Supply and Demand Trading with Retest and Impulse Model

Automating Trading Strategies in MQL5 (Part 36): Supply and Demand Trading with Retest and Impulse Model

In our previous article (Part 35), we developed a Breaker Block Trading System in MetaQuotes Language 5 (MQL5) that identified consolidation ranges, validated breaker blocks with swing points, and traded retests with customizable risk parameters and visual feedback. In Part 36, we develop a Supply and Demand Trading System utilizing a retest and impulse model. This model detects supply and demand zones through consolidation, validates them with impulsive moves, and executes trades on retests with trend confirmation and dynamic chart visualizations.
Automating Trading Strategies in MQL5 (Part 36): Supply and Demand Trading with Retest and Impulse Model
Automating Trading Strategies in MQL5 (Part 36): Supply and Demand Trading with Retest and Impulse Model
  • 2025.10.03
  • www.mql5.com
In this article, we create a supply and demand trading system in MQL5 that identifies supply and demand zones through consolidation ranges, validates them with impulsive moves, and trades retests with trend confirmation and customizable risk parameters. The system visualizes zones with dynamic labels and colors, supporting trailing stops for risk management.
 

Forum on trading, automated trading systems and testing trading strategies

Where Do I start from?

Sergey Golubev, 2025.10.10 11:16

How to publish code to CodeBase: A practical guide

How to publish code to CodeBase: A practical guide

CodeBase is the largest repository of free programs for the MetaTrader 5 and MetaTrader 4 platforms. Here, traders and developers can share their scripts, indicators, EAs, and other useful tools written in MQL5. Publishing your own code to CodeBase is a great way to contribute to the community, get feedback, build your reputation, and even attract potential clients.

In this article, we will look at publishing various types of programs in CodeBase: from simple scripts and indicators to EAs with include files. Using real-life examples, we will focus on step-by-step process of publishing each type of program. The article will be useful for those who have decided to post their works for public use for the first time. We will provide general recommendations for publication design – texts and images, codes and attached files.


 

Forum on trading, automated trading systems and testing trading strategies

Where Do I start from?

Sergey Golubev, 2025.10.11 06:45

Introduction to MQL5 (Part 22): Building an Expert Advisor for the 5-0 Harmonic Pattern

Introduction to MQL5 (Part 22): Building an Expert Advisor for the 5-0 Harmonic Pattern

This article will teach you how to recognize the 5-0 pattern automatically in an Expert Advisor and detect it programmatically. You will learn how to determine the 5-0 structure's major turning points (0, X, A, B, C, and D), calculate and validate Fibonacci ratios specific to it, and visually represent the pattern on the chart. By the end of this article, you will know how to convert the technical idea underlying the 5-0 pattern into functional MQL5 code that can analyze price action automatically.

 

Forum on trading, automated trading systems and testing trading strategies

MetaEditor, Open AI and ChatGPT

Sergey Golubev, 2025.10.11 07:09

Moving to MQL5 Algo Forge (Part 4): Working with Versions and Releases

Moving to MQL5 Algo Forge (Part 4): Working with Versions and Releases

In today's article, we will take a closer look at the stage of publishing the edits made in the repository, a certain set of changes that form a complete solution, whether it's adding new functionality to a project or fixing a discovered issue. This is the process of committing or releasing a new product version. We will see how to organize this process and what capabilities MQL5 Algo Forge provides for it.

 

Forum on trading, automated trading systems and testing trading strategies

Where Do I start from?

Sergey Golubev, 2025.10.15 06:58

Introduction to MQL5 (Part 23): Automating Opening Range Breakout Strategy

Introduction to MQL5 (Part 23): Automating Opening Range Breakout Strategy

This article will explain the Opening Range Breakout (ORB) strategy and show you how to use MQL5 to automate it. You'll learn how to set trade conditions, record the opening range, and configure your Expert Advisor to make trades automatically in response to breakouts. To make sure that entries only take place during the specified market window, we'll also look at how to employ time-based logic to regulate when trades are permitted to execute. By the end, you will know exactly how to use MetaTrader 5 to turn this classic trading strategy into a fully automated trading system.

 

Forum on trading, automated trading systems and testing trading strategies

Where Do I start from?

Sergey Golubev, 2025.10.18 04:54

Introduction to MQL5 (Part 24): Building an EA that Trades with Chart Objects

Introduction to MQL5 (Part 24): Building an EA that Trades with Chart Objects

Welcome back to Part 24 of the Introduction to MQL5 series! In this article, we’ll take a major step forward by combining manual chart analysis with automated trading execution. In particular, we'll build an Expert Advisor that makes trades straight from chart objects like rectangles, trend lines, and support and resistance lines.

 

Forum on trading, automated trading systems and testing trading strategies

Where Do I start from?

Sergey Golubev, 2025.10.23 05:17

Introduction to MQL5 (Part 25): Building an EA that Trades with Chart Objects (II)

Introduction to MQL5 (Part 25): Building an EA that Trades with Chart Objects (II)

Welcome back to Part 25 of the Introduction to MQL5 series! In the previous article, we explored how combining manual chart analysis with automated trading execution using chart objects helps bridge the gap between discretionary and automated trading. That project focused on support and resistance zones drawn with the Rectangle tool.

 

Forum on trading, automated trading systems and testing trading strategies

Where Do I start from?

Sergey Golubev, 2025.10.28 07:57

Introduction to MQL5 (Part 26): Building an EA Using Support and Resistance Zones

Introduction to MQL5 (Part 26): Building an EA Using Support and Resistance Zones

We looked at how to manually set up support and resistance zones using the rectangle chart object in Part 24 of this series. This allowed you to create a semi-automated trading system that reacts to the zones you draw. However, what if you want the EA to automatically, without human assistance, identify every support and resistance zone on the chart? This article will specifically address that. As usual, we will cover MQL5 principles in a hands-on, beginner-friendly manner using a project-based approach. You'll discover how to identify these zones programmatically, track price movements surrounding them, and create an EA that responds sensibly to possible reversals.


 

Introduction to MQL5 (Part 27): Mastering API and WebRequest Function in MQL5

Introduction to MQL5 (Part 27): Mastering API and WebRequest Function in MQL5

Welcome back to Part 27 of the Introduction to MQL5 series! Have you ever wondered how MetaTrader 5 can interact with other platforms? If so, you should read this article.

This article will concentrate on understanding the operation of APIs and how MetaTrade 5 may communicate with external servers through the WebRequest() function. To make the learning process more applicable, we will work on a small project in which MetaTrader 5 integrates with Telegram. You will discover how to use the Telegram API to send, edit, and remove messages from MetaTrader 5 with this project.

Introduction to MQL5 (Part 27): Mastering API and WebRequest Function in MQL5
Introduction to MQL5 (Part 27): Mastering API and WebRequest Function in MQL5
  • 2025.10.31
  • www.mql5.com
This article introduces how to use the WebRequest() function and APIs in MQL5 to communicate with external platforms. You’ll learn how to create a Telegram bot, obtain chat and group IDs, and send, edit, and delete messages directly from MT5, building a strong foundation for mastering API integration in your future MQL5 projects.
 

Introduction to MQL5 (Part 28): Mastering API and WebRequest Function in MQL5 (II)

Introduction to MQL5 (Part 28): Mastering API and WebRequest Function in MQL5 (II)

Welcome back to Part 28 of the Introduction to MQL5 series! In the previous article, we explored the idea of APIs, discussed the WebRequest function's essential parameters, and talked about using it to connect to external servers. That lesson laid the foundation for understanding how data flows between MetaTrader 5 and other platforms.

Introduction to MQL5 (Part 28): Mastering API and WebRequest Function in MQL5 (II)
Introduction to MQL5 (Part 28): Mastering API and WebRequest Function in MQL5 (II)
  • 2025.11.24
  • www.mql5.com
This article teaches you how to retrieve and extract price data from external platforms using APIs and the WebRequest function in MQL5. You’ll learn how URLs are structured, how API responses are formatted, how to convert server data into readable strings, and how to identify and extract specific values from JSON responses.