MQL5 Programming Articles

icon

Study the MQL5 language for programming trading strategies in numerous published articles mostly written by you - the community members. The articles are grouped into categories to help you quicker find answers to any questions related to programming: Integration, Tester, Trading Strategies, etc.

Follow our new publications and discuss them on the Forum!

Add a new article
latest | best
preview
DoEasy. Controls (Part 15): TabControl WinForms object — several rows of tab headers, tab handling methods

DoEasy. Controls (Part 15): TabControl WinForms object — several rows of tab headers, tab handling methods

In this article, I will continue working on the TabControl WinForm object — I will create a tab field object class, make it possible to arrange tab headers in several rows and add methods for handling object tabs.
preview
Developing a trading Expert Advisor from scratch (Part 26): Towards the future (I)

Developing a trading Expert Advisor from scratch (Part 26): Towards the future (I)

Today we will take our order system to the next level. But before that, we need to solve a few problems. Now we have some questions that are related to how we want to work and what things we do during the trading day.
preview
Developing a trading Expert Advisor from scratch (Part 25): Providing system robustness (II)

Developing a trading Expert Advisor from scratch (Part 25): Providing system robustness (II)

In this article, we will make the final step towards the EA's performance. So, be prepared for a long read. To make our Expert Advisor reliable, we will first remove everything from the code that is not part of the trading system.
preview
Developing a trading Expert Advisor from scratch (Part 24): Providing system robustness (I)

Developing a trading Expert Advisor from scratch (Part 24): Providing system robustness (I)

In this article, we will make the system more reliable to ensure a robust and secure use. One of the ways to achieve the desired robustness is to try to re-use the code as much as possible so that it is constantly tested in different cases. But this is only one of the ways. Another one is to use OOP.
Population optimization algorithms
Population optimization algorithms

Population optimization algorithms

This is an introductory article on optimization algorithm (OA) classification. The article attempts to create a test stand (a set of functions), which is to be used for comparing OAs and, perhaps, identifying the most universal algorithm out of all widely known ones.
preview
Neural networks made easy (Part 23): Building a tool for Transfer Learning

Neural networks made easy (Part 23): Building a tool for Transfer Learning

In this series of articles, we have already mentioned Transfer Learning more than once. However, this was only mentioning. in this article, I suggest filling this gap and taking a closer look at Transfer Learning.
preview
DoEasy. Controls (Part 14): New algorithm for naming graphical elements. Continuing work on the TabControl WinForms object

DoEasy. Controls (Part 14): New algorithm for naming graphical elements. Continuing work on the TabControl WinForms object

In this article, I will create a new algorithm for naming all graphical elements meant for building custom graphics, as well as continue developing the TabControl WinForms object.
preview
Learn how to design a trading system by Alligator

Learn how to design a trading system by Alligator

In this article, we'll complete our series about how to design a trading system based on the most popular technical indicator. We'll learn how to create a trading system based on the Alligator indicator.
preview
DoEasy. Controls (Part 13): Optimizing interaction of WinForms objects with the mouse, starting the development of the TabControl WinForms object

DoEasy. Controls (Part 13): Optimizing interaction of WinForms objects with the mouse, starting the development of the TabControl WinForms object

In this article, I will fix and optimize handling the appearance of WinForms objects after moving the mouse cursor away from the object, as well as start the development of the TabControl WinForms object.
preview
Neural networks made easy (Part 22): Unsupervised learning of recurrent models

Neural networks made easy (Part 22): Unsupervised learning of recurrent models

We continue to study unsupervised learning algorithms. This time I suggest that we discuss the features of autoencoders when applied to recurrent model training.
CCI indicator. Three transformation steps
CCI indicator. Three transformation steps

CCI indicator. Three transformation steps

In this article, I will make additional changes to the CCI affecting the very logic of this indicator. Moreover, we will be able to see it in the main chart window.
preview
Neural networks made easy (Part 21): Variational autoencoders (VAE)

Neural networks made easy (Part 21): Variational autoencoders (VAE)

In the last article, we got acquainted with the Autoencoder algorithm. Like any other algorithm, it has its advantages and disadvantages. In its original implementation, the autoenctoder is used to separate the objects from the training sample as much as possible. This time we will talk about how to deal with some of its disadvantages.
preview
DoEasy. Controls (Part 12): Base list object, ListBox and ButtonListBox WinForms objects

DoEasy. Controls (Part 12): Base list object, ListBox and ButtonListBox WinForms objects

In this article, I am going to create the base object of WinForms object lists, as well as the two new objects: ListBox and ButtonListBox.
preview
Data Science and Machine Learning (Part 07): Polynomial Regression

Data Science and Machine Learning (Part 07): Polynomial Regression

Unlike linear regression, polynomial regression is a flexible model aimed to perform better at tasks the linear regression model could not handle, Let's find out how to make polynomial models in MQL5 and make something positive out of it.
preview
Experiments with neural networks (Part 2): Smart neural network optimization

Experiments with neural networks (Part 2): Smart neural network optimization

In this article, I will use experimentation and non-standard approaches to develop a profitable trading system and check whether neural networks can be of any help for traders. MetaTrader 5 as a self-sufficient tool for using neural networks in trading.
preview
Developing a trading Expert Advisor from scratch (Part 23): New order system (VI)

Developing a trading Expert Advisor from scratch (Part 23): New order system (VI)

We will make the order system more flexible. Here we will consider changes to the code that will make it more flexible, which will allow us to change position stop levels much faster.
preview
DoEasy. Controls (Part 11): WinForms objects — groups, CheckedListBox WinForms object

DoEasy. Controls (Part 11): WinForms objects — groups, CheckedListBox WinForms object

The article considers grouping WinForms objects and creation of the CheckBox objects list object.
preview
Developing a trading Expert Advisor from scratch (Part 22): New order system (V)

Developing a trading Expert Advisor from scratch (Part 22): New order system (V)

Today we will continue to develop the new order system. It is not that easy to implement a new system as we often encounter problems which greatly complicate the process. When these problems appear, we have to stop and re-analyze the direction in which we are moving.
preview
DoEasy. Controls (Part 10): WinForms objects — Animating the interface

DoEasy. Controls (Part 10): WinForms objects — Animating the interface

It is time to animate the graphical interface by implementing the functionality for object interaction with users and objects. The new functionality will also be necessary to let more complex objects work correctly.
preview
Risk and capital management using Expert Advisors

Risk and capital management using Expert Advisors

This article is about what you can not see in a backtest report, what you should expect using automated trading software, how to manage your money if you are using expert advisors, and how to cover a significant loss to remain in the trading activity when you are using automated procedures.
preview
Neural networks made easy (Part 20): Autoencoders

Neural networks made easy (Part 20): Autoencoders

We continue to study unsupervised learning algorithms. Some readers might have questions regarding the relevance of recent publications to the topic of neural networks. In this new article, we get back to studying neural networks.
preview
Learn how to design a trading system by Accelerator Oscillator

Learn how to design a trading system by Accelerator Oscillator

A new article from our series about how to create simple trading systems by the most popular technical indicators. We will learn about a new one which is the Accelerator Oscillator indicator and we will learn how to design a trading system using it.
preview
MQL5 Wizard techniques you should know (Part 03): Shannon's Entropy

MQL5 Wizard techniques you should know (Part 03): Shannon's Entropy

Todays trader is a philomath who is almost always looking up new ideas, trying them out, choosing to modify them or discard them; an exploratory process that should cost a fair amount of diligence. These series of articles will proposition that the MQL5 wizard should be a mainstay for traders.
preview
Matrix and Vector operations in MQL5

Matrix and Vector operations in MQL5

Matrices and vectors have been introduced in MQL5 for efficient operations with mathematical solutions. The new types offer built-in methods for creating concise and understandable code that is close to mathematical notation. Arrays provide extensive capabilities, but there are many cases in which matrices are much more efficient.
preview
Learn how to design a trading system by Awesome Oscillator

Learn how to design a trading system by Awesome Oscillator

In this new article in our series, we will learn about a new technical tool that may be useful in our trading. It is the Awesome Oscillator (AO) indicator. We will learn how to design a trading system by this indicator.
preview
The price movement model and its main provisions (Part 2): Probabilistic price field evolution equation and the occurrence of the observed random walk

The price movement model and its main provisions (Part 2): Probabilistic price field evolution equation and the occurrence of the observed random walk

The article considers the probabilistic price field evolution equation and the upcoming price spike criterion. It also reveals the essence of price values on charts and the mechanism for the occurrence of a random walk of these values.
preview
Learn how to design a trading system by Relative Vigor Index

Learn how to design a trading system by Relative Vigor Index

A new article in our series about how to design a trading system by the most popular technical indicator. In this article, we will learn how to do that by the Relative Vigor Index indicator.
preview
DoEasy. Controls (Part 9): Re-arranging WinForms object methods, RadioButton and Button controls

DoEasy. Controls (Part 9): Re-arranging WinForms object methods, RadioButton and Button controls

In this article, I will fix the names of WinForms object class methods and create Button and RadioButton WinForms objects.
preview
CCI indicator. Upgrade and new features

CCI indicator. Upgrade and new features

In this article, I will consider the possibility of upgrading the CCI indicator. Besides, I will present a modification of the indicator.
preview
Learn how to design a trading system by DeMarker

Learn how to design a trading system by DeMarker

Here is a new article in our series about how to design a trading system by the most popular technical indicators. In this article, we will present how to create a trading system by the DeMarker indicator.
preview
Neural networks made easy (Part 19): Association rules using MQL5

Neural networks made easy (Part 19): Association rules using MQL5

We continue considering association rules. In the previous article, we have discussed theoretical aspect of this type of problem. In this article, I will show the implementation of the FP Growth method using MQL5. We will also test the implemented solution using real data.
preview
Developing a trading Expert Advisor from scratch (Part 21): New order system (IV)

Developing a trading Expert Advisor from scratch (Part 21): New order system (IV)

Finally, the visual system will start working, although it will not yet be completed. Here we will finish making the main changes. There will be quite a few of them, but they are all necessary. Well, the whole work will be quite interesting.
preview
Learn how to design a trading system by VIDYA

Learn how to design a trading system by VIDYA

Welcome to a new article from our series about learning how to design a trading system by the most popular technical indicators, in this article we will learn about a new technical tool and learn how to design a trading system by Variable Index Dynamic Average (VIDYA).
preview
Neural networks made easy (Part 18): Association rules

Neural networks made easy (Part 18): Association rules

As a continuation of this series of articles, let's consider another type of problems within unsupervised learning methods: mining association rules. This problem type was first used in retail, namely supermarkets, to analyze market baskets. In this article, we will talk about the applicability of such algorithms in trading.
preview
Data Science and Machine Learning — Neural Network (Part 02): Feed forward NN Architectures Design

Data Science and Machine Learning — Neural Network (Part 02): Feed forward NN Architectures Design

There are minor things to cover on the feed-forward neural network before we are through, the design being one of them. Let's see how we can build and design a flexible neural network to our inputs, the number of hidden layers, and the nodes for each of the network.
preview
Developing a trading Expert Advisor from scratch (Part 20): New order system (III)

Developing a trading Expert Advisor from scratch (Part 20): New order system (III)

We continue to implement the new order system. The creation of such a system requires a good command of MQL5, as well as an understanding of how the MetaTrader 5 platform actually works and what resources it provides.
preview
Developing a trading Expert Advisor from scratch (Part 19): New order system (II)

Developing a trading Expert Advisor from scratch (Part 19): New order system (II)

In this article, we will develop a graphical order system of the "look what happens" type. Please note that we are not starting from scratch this time, but we will modify the existing system by adding more objects and events on the chart of the asset we are trading.
preview
Metamodels in machine learning and trading: Original timing of trading orders

Metamodels in machine learning and trading: Original timing of trading orders

Metamodels in machine learning: Auto creation of trading systems with little or no human intervention — The model decides when and how to trade on its own.
preview
Learn how to design a trading system by Bull's Power

Learn how to design a trading system by Bull's Power

Welcome to a new article in our series about learning how to design a trading system by the most popular technical indicator as we will learn in this article about a new technical indicator and how we can design a trading system by it and this indicator is the Bull's Power indicator.
preview
Learn how to design a trading system by Bear's Power

Learn how to design a trading system by Bear's Power

Welcome to a new article in our series about learning how to design a trading system by the most popular technical indicator here is a new article about learning how to design a trading system by Bear's Power technical indicator.