Articles on trading system automation in MQL5

icon

Read articles on the trading systems with a wide variety of ideas at the core. Learn how to use statistical methods and patterns on candlestick charts, how to filter signals and where to use semaphore indicators.

The MQL5 Wizard will help you create robots without programming to quickly check your trading ideas. Use the Wizard to learn about genetic algorithms.

Add a new article
latest | best
preview
Multiple indicators on one chart (Part 06): Turning MetaTrader 5 into a RAD system (II)

Multiple indicators on one chart (Part 06): Turning MetaTrader 5 into a RAD system (II)

In my previous article, I showed you how to create a Chart Trade using MetaTrader 5 objects and thus to turn the platform into a RAD system. The system works very well, and for sure many of the readers might have thought about creating a library, which would allow having extended functionality in the proposed system. Based on this, it would be possible to develop a more intuitive Expert Advisor with a nicer and easier to use interface.
preview
Neural networks made easy (Part 5): Multithreaded calculations in OpenCL

Neural networks made easy (Part 5): Multithreaded calculations in OpenCL

We have earlier discussed some types of neural network implementations. In the considered networks, the same operations are repeated for each neuron. A logical further step is to utilize multithreaded computing capabilities provided by modern technology in an effort to speed up the neural network learning process. One of the possible implementations is described in this article.
preview
Learn how to design a trading system by Parabolic SAR

Learn how to design a trading system by Parabolic SAR

In this article, we will continue our series about how to design a trading system using the most popular indicators. In this article, we will learn about the Parabolic SAR indicator in detail and how we can design a trading system to be used in MetaTrader 5 using some simple strategies.
preview
Everything you need to learn about the MQL5 program structure

Everything you need to learn about the MQL5 program structure

Any Program in any programming language has a specific structure. In this article, you will learn essential parts of the MQL5 program structure by understanding the programming basics of every part of the MQL5 program structure that can be very helpful when creating our MQL5 trading system or trading tool that can be executable in the MetaTrader 5.
preview
Multiple indicators on one chart (Part 04): Advancing to an Expert Advisor

Multiple indicators on one chart (Part 04): Advancing to an Expert Advisor

In my previous articles, I have explained how to create an indicator with multiple subwindows, which becomes interesting when using custom indicators. This time we will see how to add multiple windows to an Expert Advisor.
preview
Developing a trading Expert Advisor from scratch (Part 18): New order system (I)

Developing a trading Expert Advisor from scratch (Part 18): New order system (I)

This is the first part of the new order system. Since we started documenting this EA in our articles, it has undergone various changes and improvements while maintaining the same on-chart order system model.
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.
Using Discriminant Analysis to Develop Trading Systems
Using Discriminant Analysis to Develop Trading Systems

Using Discriminant Analysis to Develop Trading Systems

When developing a trading system, there usually arises a problem of selecting the best combination of indicators and their signals. Discriminant analysis is one of the methods to find such combinations. The article gives an example of developing an EA for market data collection and illustrates the use of the discriminant analysis for building prognostic models for the FOREX market in Statistica software.
preview
Developing a trading Expert Advisor from scratch (Part 31): Towards the future (IV)

Developing a trading Expert Advisor from scratch (Part 31): Towards the future (IV)

We continue to remove separate parts from our EA. This is the last article within this series. And the last thing to be removed is the sound system. This can be a bit confusing if you haven't followed these article series.
Tracing, Debugging and Structural Analysis of Source Code
Tracing, Debugging and Structural Analysis of Source Code

Tracing, Debugging and Structural Analysis of Source Code

The entire complex of problems of creating a structure of an executed code and its tracing can be solved without serious difficulties. This possibility has appeared in MetaTrader 5 due to the new feature of the MQL5 language - automatic creation of variables of complex type of data (structures and classes) and their elimination when going out of local scope. The article contains the description of the methodology and the ready-made tool.
preview
Creating an EA that works automatically (Part 06): Account types (I)

Creating an EA that works automatically (Part 06): Account types (I)

Today we'll see how to create an Expert Advisor that simply and safely works in automatic mode. Our EA in its current state can work in any situation but it is not yet ready for automation. We still have to work on a few points.
preview
How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 2): Indicator Signals: Multi Timeframe Parabolic SAR Indicator

How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 2): Indicator Signals: Multi Timeframe Parabolic SAR Indicator

The Multi-Currency Expert Advisor in this article is Expert Advisor or trading robot that can trade (open orders, close orders and manage orders for example: Trailing Stop Loss and Trailing Profit) for more than 1 symbol pair only from one symbol chart. This time we will use only 1 indicator, namely Parabolic SAR or iSAR in multi-timeframes starting from PERIOD_M15 to PERIOD_D1.
preview
Pair trading

Pair trading

In this article, we will consider pair trading, namely what its principles are and if there are any prospects for its practical application. We will also try to create a pair trading strategy.
preview
Data Science and Machine Learning (Part 11): Naïve Bayes, Probability theory in Trading

Data Science and Machine Learning (Part 11): Naïve Bayes, Probability theory in Trading

Trading with probability is like walking on a tightrope - it requires precision, balance, and a keen understanding of risk. In the world of trading, the probability is everything. It's the difference between success and failure, profit and loss. By leveraging the power of probability, traders can make informed decisions, manage risk effectively, and achieve their financial goals. So, whether you're a seasoned investor or a novice trader, understanding probability is the key to unlocking your trading potential. In this article, we'll explore the exciting world of trading with probability and show you how to take your trading game to the next level.
Filtering Signals Based on Statistical Data of Price Correlation
Filtering Signals Based on Statistical Data of Price Correlation

Filtering Signals Based on Statistical Data of Price Correlation

Is there any correlation between the past price behavior and its future trends? Why does the price repeat today the character of its previous day movement? Can the statistics be used to forecast the price dynamics? There is an answer, and it is positive. If you have any doubt, then this article is for you. I'll tell how to create a working filter for a trading system in MQL5, revealing an interesting pattern in price changes.
Optimal approach to the development and analysis of trading systems
Optimal approach to the development and analysis of trading systems

Optimal approach to the development and analysis of trading systems

In this article, I will show the criteria to be used when selecting a system or a signal for investing your funds, as well as describe the optimal approach to the development of trading systems and highlight the importance of this matter in Forex trading.
preview
Revisiting an Old Trend Trading Strategy: Two Stochastic oscillators, a MA and Fibonacci

Revisiting an Old Trend Trading Strategy: Two Stochastic oscillators, a MA and Fibonacci

Old trading strategies. This article presents one of the strategies used to follow the trend in a purely technical way. The strategy is purely technical and uses a few technical indicators and tools to deliver signals and targets. The components of the strategy are as follows: A 14-period stochastic oscillator. A 5-period stochastic oscillator. A 200-period moving average. A Fibonacci projection tool (for target setting).
preview
How to create a custom indicator (Heiken Ashi) using MQL5

How to create a custom indicator (Heiken Ashi) using MQL5

In this article, we will learn how to create a custom indicator using MQL5 based on our preferences, to be used in MetaTrader 5 to help us read charts or to be used in automated Expert Advisors.
preview
Gradient boosting in transductive and active machine learning

Gradient boosting in transductive and active machine learning

In this article, we will consider active machine learning methods utilizing real data, as well discuss their pros and cons. Perhaps you will find these methods useful and will include them in your arsenal of machine learning models. Transduction was introduced by Vladimir Vapnik, who is the co-inventor of the Support-Vector Machine (SVM).
Library for easy and quick development of MetaTrader programs (part IX): Compatibility with MQL4 - Preparing data
Library for easy and quick development of MetaTrader programs (part IX): Compatibility with MQL4 - Preparing data

Library for easy and quick development of MetaTrader programs (part IX): Compatibility with MQL4 - Preparing data

In the previous articles, we started creating a large cross-platform library simplifying the development of programs for MetaTrader 5 and MetaTrader 4 platforms. In the eighth part, we implemented the class for tracking order and position modification events. Here, we will improve the library by making it fully compatible with MQL4.
preview
Neural networks made easy (Part 13): Batch Normalization

Neural networks made easy (Part 13): Batch Normalization

In the previous article, we started considering methods aimed at improving neural network training quality. In this article, we will continue this topic and will consider another approach — batch data normalization.
Jeremy Scott - Successful MQL5 Market Seller
Jeremy Scott - Successful MQL5 Market Seller

Jeremy Scott - Successful MQL5 Market Seller

Jeremy Scott who is better known under Johnnypasado nickname at MQL5.community became famous offering products in our MQL5 Market service. Jeremy has already made several thousands of dollars in the Market and that is not the limit. We decided to take a closer look at the future millionaire and receive some pieces of advice for MQL5 Market sellers.
preview
Learn how to design a trading system by Gator Oscillator

Learn how to design a trading system by Gator Oscillator

A new article in our series about learning how to design a trading system based on popular technical indicators will be about the Gator Oscillator technical indicator and how to create a trading system through simple strategies.
preview
Data Science and Machine Learning (Part 04): Predicting Current Stock Market Crash

Data Science and Machine Learning (Part 04): Predicting Current Stock Market Crash

In this article I am going to attempt to use our logistic model to predict the stock market crash based upon the fundamentals of the US economy, the NETFLIX and APPLE are the stocks we are going to focus on, Using the previous market crashes of 2019 and 2020 let's see how our model will perform in the current dooms and glooms.
preview
Magic of time trading intervals with Frames Analyzer tool

Magic of time trading intervals with Frames Analyzer tool

What is Frames Analyzer? This is a plug-in module for any Expert Advisor for analyzing optimization frames during parameter optimization in the strategy tester, as well as outside the tester, by reading an MQD file or a database that is created immediately after parameter optimization. You will be able to share these optimization results with other users who have the Frames Analyzer tool to discuss the results together.
Prices in DoEasy library (part 62): Updating tick series in real time, preparation for working with Depth of Market
Prices in DoEasy library (part 62): Updating tick series in real time, preparation for working with Depth of Market

Prices in DoEasy library (part 62): Updating tick series in real time, preparation for working with Depth of Market

In this article, I will implement updating tick data in real time and prepare the symbol object class for working with Depth of Market (DOM itself is to be implemented in the next article).
Universal regression model for market price prediction (Part 2): Natural, technological and social transient functions
Universal regression model for market price prediction (Part 2): Natural, technological and social transient functions

Universal regression model for market price prediction (Part 2): Natural, technological and social transient functions

This article is a logical continuation of the previous one. It highlights the facts that confirm the conclusions made in the first article. These facts were revealed within ten years after its publication. They are centered around three detected dynamic transient functions describing the patterns in market price changes.
Library for easy and quick development of MetaTrader programs (part VI): Netting account events
Library for easy and quick development of MetaTrader programs (part VI): Netting account events

Library for easy and quick development of MetaTrader programs (part VI): Netting account events

In the previous articles, we started creating a large cross-platform library simplifying the development of programs for MetaTrader 5 and MetaTrader 4 platforms. In the fifth part of the article series, we created trading event classes and the event collection, from which the events are sent to the base object of the Engine library and the control program chart. In this part, we will let the library to work on netting accounts.
preview
Timeseries in DoEasy library (part 55): Indicator collection class

Timeseries in DoEasy library (part 55): Indicator collection class

The article continues developing indicator object classes and their collections. For each indicator object create its description and correct collection class for error-free storage and getting indicator objects from the collection list.
preview
Creating an EA that works automatically (Part 03): New functions

Creating an EA that works automatically (Part 03): New functions

Today we'll see how to create an Expert Advisor that simply and safely works in automatic mode. In the previous article, we started to develop an order system that we will use in our automated EA. However, we have created only one of the necessary functions.
preview
Neural networks made easy (Part 36): Relational Reinforcement Learning

Neural networks made easy (Part 36): Relational Reinforcement Learning

In the reinforcement learning models we discussed in previous article, we used various variants of convolutional networks that are able to identify various objects in the original data. The main advantage of convolutional networks is the ability to identify objects regardless of their location. At the same time, convolutional networks do not always perform well when there are various deformations of objects and noise. These are the issues which the relational model can solve.
preview
Learn how to design a trading system by Bill Williams' MFI

Learn how to design a trading system by Bill Williams' MFI

This is a new article in the series in which we learn how to design a trading system based on popular technical indicators. This time we will cover Bill Williams' Market Facilitation Index (BW MFI).
preview
Category Theory in MQL5 (Part 16): Functors with Multi-Layer Perceptrons

Category Theory in MQL5 (Part 16): Functors with Multi-Layer Perceptrons

This article, the 16th in our series, continues with a look at Functors and how they can be implemented using artificial neural networks. We depart from our approach so far in the series, that has involved forecasting volatility and try to implement a custom signal class for setting position entry and exit signals.
preview
Simple Mean Reversion Trading Strategy

Simple Mean Reversion Trading Strategy

Mean reversion is a type of contrarian trading where the trader expects the price to return to some form of equilibrium which is generally measured by a mean or another central tendency statistic.
preview
Neural networks made easy (Part 30): Genetic algorithms

Neural networks made easy (Part 30): Genetic algorithms

Today I want to introduce you to a slightly different learning method. We can say that it is borrowed from Darwin's theory of evolution. It is probably less controllable than the previously discussed methods but it allows training non-differentiable models.
preview
Neural networks made easy (Part 27): Deep Q-Learning (DQN)

Neural networks made easy (Part 27): Deep Q-Learning (DQN)

We continue to study reinforcement learning. In this article, we will get acquainted with the Deep Q-Learning method. The use of this method has enabled the DeepMind team to create a model that can outperform a human when playing Atari computer games. I think it will be useful to evaluate the possibilities of the technology for solving trading problems.
preview
Trader-friendly stop loss and take profit

Trader-friendly stop loss and take profit

Stop loss and take profit can have a significant impact on trading results. In this article, we will look at several ways to find optimal stop order values.
preview
Creating an EA that works automatically (Part 15): Automation (VII)

Creating an EA that works automatically (Part 15): Automation (VII)

To complete this series of articles on automation, we will continue discussing the topic of the previous article. We will see how everything will fit together, making the EA run like clockwork.
preview
Creating an EA that works automatically (Part 04): Manual triggers (I)

Creating an EA that works automatically (Part 04): Manual triggers (I)

Today we'll see how to create an Expert Advisor that simply and safely works in automatic mode.
preview
Timeseries in DoEasy library (part 56): Custom indicator object, get data from indicator objects in the collection

Timeseries in DoEasy library (part 56): Custom indicator object, get data from indicator objects in the collection

The article considers creation of the custom indicator object for the use in EAs. Let’s slightly improve library classes and add methods to get data from indicator objects in EAs.