Articles on manual and algorithmic trading in MetaTrader 5

icon

This category features articles on all aspects of trading - from manual to fully automatic trading, from Expert Advisor ideas to trading robot creation using the MQL5 Wizard. Position management, processing of trade events and money management - these integral parts of trading are covered in theses articles.

Learn how to copy trading signals and how to provide around-the-clock operation of Expert Advisors, how to create a trading robot and how to run MetaTrader on Linux and MacOS, what social trading is and how to order a trading robot.

Add a new article
latest | best
preview
Creating an EA that works automatically (Part 14): Automation (VI)

Creating an EA that works automatically (Part 14): Automation (VI)

In this article, we will put into practice all the knowledge from this series. We will finally build a 100% automated and functional system. But before that, we still have to learn one last detail.
preview
Developing a trading Expert Advisor from scratch (Part 29): The talking platform

Developing a trading Expert Advisor from scratch (Part 29): The talking platform

In this article, we will learn how to make the MetaTrader 5 platform talk. What if we make the EA more fun? Financial market trading is often too boring and monotonous, but we can make this job less tiring. Please note that this project can be dangerous for those who experience problems such as addiction. However, in a general case, it just makes things less boring.
preview
Creating an EA that works automatically (Part 05): Manual triggers (II)

Creating an EA that works automatically (Part 05): Manual triggers (II)

Today we'll see how to create an Expert Advisor that simply and safely works in automatic mode. At the end of the previous article, I suggested that it would be appropriate to allow manual use of the EA, at least for a while.
preview
How to create a custom Donchian Channel indicator using MQL5

How to create a custom Donchian Channel indicator using MQL5

There are many technical tools that can be used to visualize a channel surrounding prices, One of these tools is the Donchian Channel indicator. In this article, we will learn how to create the Donchian Channel indicator and how we can trade it as a custom indicator using EA.
preview
Creating an EA that works automatically (Part 09): Automation (I)

Creating an EA that works automatically (Part 09): Automation (I)

Although the creation of an automated EA is not a very difficult task, however, many mistakes can be made without the necessary knowledge. In this article, we will look at how to build the first level of automation, which consists in creating a trigger to activate breakeven and a trailing stop level.
preview
Creating Graphical Panels Became Easy in MQL5

Creating Graphical Panels Became Easy in MQL5

In this article, we will provide a simple and easy guide to anyone who needs to create one of the most valuable and helpful tools in trading which is the graphical panel to simplify and ease doing tasks around trading which helps to save time and focus more on your trading process itself without any distractions.
Technical Analysis: How Do We Analyze?
Technical Analysis: How Do We Analyze?

Technical Analysis: How Do We Analyze?

This article briefly describes the author's opinion on redrawing indicators, multi-timeframe indicators and displaying of quotes with Japanese candlesticks. The article contain no programming specifics and is of a general character.
preview
Creating an EA that works automatically (Part 13): Automation (V)

Creating an EA that works automatically (Part 13): Automation (V)

Do you know what a flowchart is? Can you use it? Do you think flowcharts are for beginners? I suggest that we proceed to this new article and learn how to work with flowcharts.
preview
Understanding functions in MQL5 with applications

Understanding functions in MQL5 with applications

Functions are critical things in any programming language, it helps developers apply the concept of (DRY) which means do not repeat yourself, and many other benefits. In this article, you will find much more information about functions and how we can create our own functions in MQL5 with simple applications that can be used or called in any system you have to enrich your trading system without complicating things.
preview
Rebuy algorithm: Math model for increasing efficiency

Rebuy algorithm: Math model for increasing efficiency

In this article, we will use the rebuy algorithm for a deeper understanding of the efficiency of trading systems and start working on the general principles of improving trading efficiency using mathematics and logic, as well as apply the most non-standard methods of increasing efficiency in terms of using absolutely any trading system.
preview
Moral expectation in trading

Moral expectation in trading

This article is about moral expectation. We will look at several examples of its use in trading, as well as the results that can be achieved with its help.
preview
How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 5):  Bollinger Bands On Keltner Channel — Indicators Signal

How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 5): Bollinger Bands On Keltner Channel — Indicators Signal

The Multi-Currency Expert Advisor in this article is an 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 one symbol pair from only one symbol chart. In this article we will use signals from two indicators, in this case Bollinger Bands® on Keltner Channel.
Technical Analysis: What Do We Analyze?
Technical Analysis: What Do We Analyze?

Technical Analysis: What Do We Analyze?

This article tries to analyze several peculiarities of representation of quotes available in the MetaTrader client terminal. The article is general, it doesn't concern programming.
preview
Algorithmic Trading With MetaTrader 5 And R For Beginners

Algorithmic Trading With MetaTrader 5 And R For Beginners

Embark on a compelling exploration where financial analysis meets algorithmic trading as we unravel the art of seamlessly uniting R and MetaTrader 5. This article is your guide to bridging the realms of analytical finesse in R with the formidable trading capabilities of MetaTrader 5.
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
Creating a ticker tape panel: Basic version

Creating a ticker tape panel: Basic version

Here I will show how to create screens with price tickers which are usually used to display quotes on the exchange. I will do it by only using MQL5, without using complex external programming.
preview
Creating an EA that works automatically (Part 08): OnTradeTransaction

Creating an EA that works automatically (Part 08): OnTradeTransaction

In this article, we will see how to use the event handling system to quickly and efficiently process issues related to the order system. With this system the EA will work faster, so that it will not have to constantly search for the required data.
How we developed the MetaTrader Signals service and Social Trading
How we developed the MetaTrader Signals service and Social Trading

How we developed the MetaTrader Signals service and Social Trading

We continue to enhance the Signals service, improve the mechanisms, add new functions and fix flaws. The MetaTrader Signals Service of 2012 and the current MetaTrader Signals Service are like two completely different services. Currently, we are implementing A Virtual Hosting Cloud service which consists of a network of servers to support specific versions of the MetaTrader client terminal.
preview
Multiple indicators on one chart (Part 05): Turning MetaTrader 5 into a RAD system (I)

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

There are a lot of people who do not know how to program but they are quite creative and have great ideas. However, the lack of programming knowledge prevents them from implementing these ideas. Let's see together how to create a Chart Trade using the MetaTrader 5 platform itself, as if it were an IDE.
preview
Category Theory (Part 9): Monoid-Actions

Category Theory (Part 9): Monoid-Actions

This article continues the series on category theory implementation in MQL5. Here we continue monoid-actions as a means of transforming monoids, covered in the previous article, leading to increased applications.
preview
Understanding MQL5 Object-Oriented Programming (OOP)

Understanding MQL5 Object-Oriented Programming (OOP)

As developers, we need to learn how to create and develop software that can be reusable and flexible without duplicated code especially if we have different objects with different behaviors. This can be smoothly done by using object-oriented programming techniques and principles. In this article, we will present the basics of MQL5 Object-Oriented programming to understand how we can use principles and practices of this critical topic in our software.
preview
Developing a trading Expert Advisor from scratch (Part 28): Towards the future (III)

Developing a trading Expert Advisor from scratch (Part 28): Towards the future (III)

There is still one task which our order system is not up to, but we will FINALLY figure it out. The MetaTrader 5 provides a system of tickets which allows creating and correcting order values. The idea is to have an Expert Advisor that would make the same ticket system faster and more efficient.
preview
How to create a custom True Strength Index indicator using MQL5

How to create a custom True Strength Index indicator using MQL5

Here is a new article about how to create a custom indicator. This time we will work with the True Strength Index (TSI) and will create an Expert Advisor based on it.
preview
Understand and Use MQL5 Strategy Tester Effectively

Understand and Use MQL5 Strategy Tester Effectively

There is an essential need for MQL5 programmers or developers to master important and valuable tools. One of these tools is the Strategy Tester, this article is a practical guide to understanding and using the strategy tester of MQL5.
preview
Data Science and Machine Learning (Part 12): Can Self-Training Neural Networks Help You Outsmart the Stock Market?

Data Science and Machine Learning (Part 12): Can Self-Training Neural Networks Help You Outsmart the Stock Market?

Are you tired of constantly trying to predict the stock market? Do you wish you had a crystal ball to help you make more informed investment decisions? Self-trained neural networks might be the solution you've been looking for. In this article, we explore whether these powerful algorithms can help you "ride the wave" and outsmart the stock market. By analyzing vast amounts of data and identifying patterns, self-trained neural networks can make predictions that are often more accurate than human traders. Discover how you can use this cutting-edge technology to maximize your profits and make smarter investment decisions.
preview
Creating an EA that works automatically (Part 10): Automation (II)

Creating an EA that works automatically (Part 10): Automation (II)

Automation means nothing if you cannot control its schedule. No worker can be efficient working 24 hours a day. However, many believe that an automated system should operate 24 hours a day. But it is always good to have means to set a working time range for the EA. In this article, we will consider how to properly set such a time range.
preview
Learn how to deal with date and time in MQL5

Learn how to deal with date and time in MQL5

A new article about a new important topic which is dealing with date and time. As traders or programmers of trading tools, it is very crucial to understand how to deal with these two aspects date and time very well and effectively. So, I will share some important information about how we can deal with date and time to create effective trading tools smoothly and simply without any complicity as much as I can.
preview
Automated grid trading using limit orders on Moscow Exchange (MOEX)

Automated grid trading using limit orders on Moscow Exchange (MOEX)

The article considers the development of an MQL5 Expert Advisor (EA) for MetaTrader 5 aimed at working on MOEX. The EA is to follow a grid strategy while trading on MOEX using MetaTrader 5 terminal. The EA involves closing positions by stop loss and take profit, as well as removing pending orders in case of certain market conditions.
preview
Developing a Replay System — Market simulation (Part 21): FOREX (II)

Developing a Replay System — Market simulation (Part 21): FOREX (II)

We will continue to build a system for working in the FOREX market. In order to solve this problem, we must first declare the loading of ticks before loading the previous bars. This solves the problem, but at the same time forces the user to follow some structure in the configuration file, which, personally, does not make much sense to me. The reason is that by designing a program that is responsible for analyzing and executing what is in the configuration file, we can allow the user to declare the elements he needs in any order.
preview
Data Science and Machine Learning (Part 06): Gradient Descent

Data Science and Machine Learning (Part 06): Gradient Descent

The gradient descent plays a significant role in training neural networks and many machine learning algorithms. It is a quick and intelligent algorithm despite its impressive work it is still misunderstood by a lot of data scientists let's see what it is all about.
preview
Developing a trading Expert Advisor from scratch (Part 11): Cross order system

Developing a trading Expert Advisor from scratch (Part 11): Cross order system

In this article we will create a system of cross orders. There is one type of assets that makes traders' life very difficult for traders — futures contracts. But why do they make life difficult?
preview
Revisiting Murray system

Revisiting Murray system

Graphical price analysis systems are deservedly popular among traders. In this article, I am going to describe the complete Murray system, including its famous levels, as well as some other useful techniques for assessing the current price position and making a trading decision.
preview
Developing a Replay System — Market simulation (Part 20): FOREX (I)

Developing a Replay System — Market simulation (Part 20): FOREX (I)

The initial goal of this article is not to cover all the possibilities of Forex trading, but rather to adapt the system so that you can perform at least one market replay. We'll leave simulation for another moment. However, if we don't have ticks and only bars, with a little effort we can simulate possible trades that could happen in the Forex market. This will be the case until we look at how to adapt the simulator. An attempt to work with Forex data inside the system without modifying it leads to a range of errors.
preview
How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 4): Triangular moving average — Indicator Signals

How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 4): Triangular moving average — Indicator Signals

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 one symbol pair only from one symbol chart. This time we will use only 1 indicator, namely Triangular moving average in multi-timeframes or single timeframe.
preview
Developing a Replay System — Market simulation (Part 15): Birth of the SIMULATOR (V) - RANDOM WALK

Developing a Replay System — Market simulation (Part 15): Birth of the SIMULATOR (V) - RANDOM WALK

In this article we will complete the development of a simulator for our system. The main goal here will be to configure the algorithm discussed in the previous article. This algorithm aims to create a RANDOM WALK movement. Therefore, to understand today's material, it is necessary to understand the content of previous articles. If you have not followed the development of the simulator, I advise you to read this sequence from the very beginning. Otherwise, you may get confused about what will be explained here.
preview
How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 3): Added symbols prefixes and/or suffixes and Trading Time Session

How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 3): Added symbols prefixes and/or suffixes and Trading Time Session

Several fellow traders sent emails or commented about how to use this Multi-Currency EA on brokers with symbol names that have prefixes and/or suffixes, and also how to implement trading time zones or trading time sessions on this Multi-Currency EA.
preview
Brute force approach to patterns search (Part VI): Cyclic optimization

Brute force approach to patterns search (Part VI): Cyclic optimization

In this article I will show the first part of the improvements that allowed me not only to close the entire automation chain for MetaTrader 4 and 5 trading, but also to do something much more interesting. From now on, this solution allows me to fully automate both creating EAs and optimization, as well as to minimize labor costs for finding effective trading configurations.
preview
How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 6): Two RSI indicators cross each other's lines

How to create a simple Multi-Currency Expert Advisor using MQL5 (Part 6): Two RSI indicators cross each other's lines

The multi-currency expert advisor in this article is an expert advisor or trading robot that uses two RSI indicators with crossing lines, the Fast RSI which crosses with the Slow RSI.
preview
The price movement model and its main provisions. (Part 3): Calculating optimal parameters of stock exchange speculations

The price movement model and its main provisions. (Part 3): Calculating optimal parameters of stock exchange speculations

Within the framework of the engineering approach developed by the author based on the probability theory, the conditions for opening a profitable position are found and the optimal (profit-maximizing) take profit and stop loss values are calculated.
Outline of MetaTrader Market (Infographics)
Outline of MetaTrader Market (Infographics)

Outline of MetaTrader Market (Infographics)

A few weeks ago we published the infographic on Freelance service. We also promised to reveal some statistics of the MetaTrader Market. Now, we invite you to examine the data we have gathered.