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 a Trading Administrator Panel in MQL5 (Part III): Enhancing the GUI with Visual Styling (I)

Creating a Trading Administrator Panel in MQL5 (Part III): Enhancing the GUI with Visual Styling (I)

In this article, we will focus on visually styling the graphical user interface (GUI) of our Trading Administrator Panel using MQL5. We’ll explore various techniques and features available in MQL5 that allow for customization and optimization of the interface, ensuring it meets the needs of traders while maintaining an attractive aesthetic.
preview
Developing a multi-currency Expert Advisor (Part 10): Creating objects from a string

Developing a multi-currency Expert Advisor (Part 10): Creating objects from a string

The EA development plan includes several stages with intermediate results being saved in the database. They can only be retrieved from there again as strings or numbers, not objects. So we need a way to recreate the desired objects in the EA from the strings read from the database.
preview
Example of Stochastic Optimization and Optimal Control

Example of Stochastic Optimization and Optimal Control

This Expert Advisor, named SMOC (likely standing for Stochastic Model Optimal Control), is a simple example of an advanced algorithmic trading system for MetaTrader 5. It uses a combination of technical indicators, model predictive control, and dynamic risk management to make trading decisions. The EA incorporates adaptive parameters, volatility-based position sizing, and trend analysis to optimize its performance across varying market conditions.
preview
Formulating Dynamic Multi-Pair EA (Part 1): Currency Correlation and Inverse Correlation

Formulating Dynamic Multi-Pair EA (Part 1): Currency Correlation and Inverse Correlation

Dynamic multi pair Expert Advisor leverages both on correlation and inverse correlation strategies to optimize trading performance. By analyzing real-time market data, it identifies and exploits the relationship between currency pairs.
preview
Building A Candlestick Trend Constraint Model (Part 8): Expert Advisor Development (II)

Building A Candlestick Trend Constraint Model (Part 8): Expert Advisor Development (II)

Think about an independent Expert Advisor. Previously, we discussed an indicator-based Expert Advisor that also partnered with an independent script for drawing risk and reward geometry. Today, we will discuss the architecture of an MQL5 Expert Advisor, that integrates, all the features in one program.
preview
Automating Trading Strategies with Parabolic SAR Trend Strategy in MQL5: Crafting an Effective Expert Advisor

Automating Trading Strategies with Parabolic SAR Trend Strategy in MQL5: Crafting an Effective Expert Advisor

In this article, we will automate the trading strategies with Parabolic SAR Strategy in MQL5: Crafting an Effective Expert Advisor. The EA will make trades based on trends identified by the Parabolic SAR indicator.
preview
Building a Candlestick Trend Constraint Model (Part 8): Expert Advisor Development (I)

Building a Candlestick Trend Constraint Model (Part 8): Expert Advisor Development (I)

In this discussion, we will create our first Expert Advisor in MQL5 based on the indicator we made in the prior article. We will cover all the features required to make the process automatic, including risk management. This will extensively benefit the users to advance from manual execution of trades to automated systems.
preview
News Trading Made Easy (Part 3): Performing Trades

News Trading Made Easy (Part 3): Performing Trades

In this article, our news trading expert will begin opening trades based on the economic calendar stored in our database. In addition, we will improve the expert's graphics to display more relevant information about upcoming economic calendar events.
preview
Developing a multi-currency Expert Advisor (Part 6): Automating the selection of an instance group

Developing a multi-currency Expert Advisor (Part 6): Automating the selection of an instance group

After optimizing the trading strategy, we receive sets of parameters. We can use them to create several instances of trading strategies combined in one EA. Previously, we did this manually. Here we will try to automate this process.
preview
Example of Auto Optimized Take Profits and Indicator Parameters with SMA and EMA

Example of Auto Optimized Take Profits and Indicator Parameters with SMA and EMA

This article presents a sophisticated Expert Advisor for forex trading, combining machine learning with technical analysis. It focuses on trading Apple stock, featuring adaptive optimization, risk management, and multiple strategies. Backtesting shows promising results with high profitability but also significant drawdowns, indicating potential for further refinement.
preview
Tuning LLMs with Your Own Personalized Data and Integrating into EA (Part 5): Develop and Test Trading Strategy with LLMs(I)-Fine-tuning

Tuning LLMs with Your Own Personalized Data and Integrating into EA (Part 5): Develop and Test Trading Strategy with LLMs(I)-Fine-tuning

With the rapid development of artificial intelligence today, language models (LLMs) are an important part of artificial intelligence, so we should think about how to integrate powerful LLMs into our algorithmic trading. For most people, it is difficult to fine-tune these powerful models according to their needs, deploy them locally, and then apply them to algorithmic trading. This series of articles will take a step-by-step approach to achieve this goal.
preview
Implementing the Zeus EA: Automated Trading with RSI and Moving Averages in MQL5

Implementing the Zeus EA: Automated Trading with RSI and Moving Averages in MQL5

This article outlines the steps to implement the Zeus EA based on the RSI and Moving Average indicators for guiding automated trading.
preview
Implementing a Bollinger Bands Trading Strategy with MQL5: A Step-by-Step Guide

Implementing a Bollinger Bands Trading Strategy with MQL5: A Step-by-Step Guide

A step-by-step guide to implementing an automated trading algorithm in MQL5 based on the Bollinger Bands trading strategy. A detailed tutorial based on creating an Expert Advisor that can be useful for traders.
preview
Risk manager for manual trading

Risk manager for manual trading

In this article we will discuss in detail how to write a risk manager class for manual trading from scratch. This class can also be used as a base class for inheritance by algorithmic traders who use automated programs.
preview
Data Science and ML (Part 28): Predicting Multiple Futures for EURUSD, Using AI

Data Science and ML (Part 28): Predicting Multiple Futures for EURUSD, Using AI

It is a common practice for many Artificial Intelligence models to predict a single future value. However, in this article, we will delve into the powerful technique of using machine learning models to predict multiple future values. This approach, known as multistep forecasting, allows us to predict not only tomorrow's closing price but also the day after tomorrow's and beyond. By mastering multistep forecasting, traders and data scientists can gain deeper insights and make more informed decisions, significantly enhancing their predictive capabilities and strategic planning.
preview
From Novice to Expert: The Essential Journey Through MQL5 Trading

From Novice to Expert: The Essential Journey Through MQL5 Trading

Unlock your potential! You're surrounded by opportunities. Discover 3 top secrets to kickstart your MQL5 journey or take it to the next level. Let's dive into discussion of tips and tricks for beginners and pros alike.
preview
Practicing the development of trading strategies

Practicing the development of trading strategies

In this article, we will make an attempt to develop our own trading strategy. Any trading strategy must be based on some kind of statistical advantage. Moreover, this advantage should exist for a long time.
preview
Building A Candlestick Trend Constraint Model (Part 7): Refining our model for EA development

Building A Candlestick Trend Constraint Model (Part 7): Refining our model for EA development

In this article, we will delve into the detailed preparation of our indicator for Expert Advisor (EA) development. Our discussion will encompass further refinements to the current version of the indicator to enhance its accuracy and functionality. Additionally, we will introduce new features that mark exit points, addressing a limitation of the previous version, which only identified entry points.
preview
Introduction to MQL5 (Part 8): Beginner's Guide to Building Expert Advisors (II)

Introduction to MQL5 (Part 8): Beginner's Guide to Building Expert Advisors (II)

This article addresses common beginner questions from MQL5 forums and demonstrates practical solutions. Learn to perform essential tasks like buying and selling, obtaining candlestick prices, and managing automated trading aspects such as trade limits, trading periods, and profit/loss thresholds. Get step-by-step guidance to enhance your understanding and implementation of these concepts in MQL5.
preview
Developing an Expert Advisor (EA) based on the Consolidation Range Breakout strategy in MQL5

Developing an Expert Advisor (EA) based on the Consolidation Range Breakout strategy in MQL5

This article outlines the steps to create an Expert Advisor (EA) that capitalizes on price breakouts after consolidation periods. By identifying consolidation ranges and setting breakout levels, traders can automate their trading decisions based on this strategy. The Expert Advisor aims to provide clear entry and exit points while avoiding false breakouts
preview
Cascade Order Trading Strategy Based on EMA Crossovers for MetaTrader 5

Cascade Order Trading Strategy Based on EMA Crossovers for MetaTrader 5

The article guides in demonstrating an automated algorithm based on EMA Crossovers for MetaTrader 5. Detailed information on all aspects of demonstrating an Expert Advisor in MQL5 and testing it in MetaTrader 5 - from analyzing price range behaviors to risk management.
preview
Creating an Interactive Graphical User Interface in MQL5 (Part 2): Adding Controls and Responsiveness

Creating an Interactive Graphical User Interface in MQL5 (Part 2): Adding Controls and Responsiveness

Enhancing the MQL5 GUI panel with dynamic features can significantly improve the trading experience for users. By incorporating interactive elements, hover effects, and real-time data updates, the panel becomes a powerful tool for modern traders.
preview
Using PatchTST Machine Learning Algorithm for Predicting Next 24 Hours of Price Action

Using PatchTST Machine Learning Algorithm for Predicting Next 24 Hours of Price Action

In this article, we apply a relatively complex neural network algorithm released in 2023 called PatchTST for predicting the price action for the next 24 hours. We will use the official repository, make slight modifications, train a model for EURUSD, and apply it to making future predictions both in Python and MQL5.
preview
Creating a Daily Drawdown Limiter EA in MQL5

Creating a Daily Drawdown Limiter EA in MQL5

The article discusses, from a detailed perspective, how to implement the creation of an Expert Advisor (EA) based on the trading algorithm. This helps to automate the system in the MQL5 and take control of the Daily Drawdown.
preview
Creating an Interactive Graphical User Interface in MQL5 (Part 1): Making the Panel

Creating an Interactive Graphical User Interface in MQL5 (Part 1): Making the Panel

This article explores the fundamental steps in crafting and implementing a Graphical User Interface (GUI) panel using MetaQuotes Language 5 (MQL5). Custom utility panels enhance user interaction in trading by simplifying common tasks and visualizing essential trading information. By creating custom panels, traders can streamline their workflow and save time during trading operations.
preview
Developing Zone Recovery Martingale strategy in MQL5

Developing Zone Recovery Martingale strategy in MQL5

The article discusses, in a detailed perspective, the steps that need to be implemented towards the creation of an expert advisor based on the Zone Recovery trading algorithm. This helps aotomate the system saving time for algotraders.
preview
Mastering Market Dynamics: Creating a Support and Resistance Strategy Expert Advisor (EA)

Mastering Market Dynamics: Creating a Support and Resistance Strategy Expert Advisor (EA)

A comprehensive guide to developing an automated trading algorithm based on the Support and Resistance strategy. Detailed information on all aspects of creating an expert advisor in MQL5 and testing it in MetaTrader 5 – from analyzing price range behaviors to risk management.
preview
Creating Time Series Predictions using LSTM Neural Networks: Normalizing Price and Tokenizing Time

Creating Time Series Predictions using LSTM Neural Networks: Normalizing Price and Tokenizing Time

This article outlines a simple strategy for normalizing the market data using the daily range and training a neural network to enhance market predictions. The developed models may be used in conjunction with an existing technical analysis frameworks or on a standalone basis to assist in predicting the overall market direction. The framework outlined in this article may be further refined by any technical analyst to develop models suitable for both manual and automated trading strategies.
preview
Building A Candlestick Trend Constraint Model (Part 5): Notification System (Part II)

Building A Candlestick Trend Constraint Model (Part 5): Notification System (Part II)

Today, we are discussing a working Telegram integration for MetaTrader 5 Indicator notifications using the power of MQL5, in partnership with Python and the Telegram Bot API. We will explain everything in detail so that no one misses any point. By the end of this project, you will have gained valuable insights to apply in your projects.
preview
Integrate Your Own LLM into EA (Part 4): Training Your Own LLM with GPU

Integrate Your Own LLM into EA (Part 4): Training Your Own LLM with GPU

With the rapid development of artificial intelligence today, language models (LLMs) are an important part of artificial intelligence, so we should think about how to integrate powerful LLMs into our algorithmic trading. For most people, it is difficult to fine-tune these powerful models according to their needs, deploy them locally, and then apply them to algorithmic trading. This series of articles will take a step-by-step approach to achieve this goal.
preview
Data Science and Machine Learning (Part 24): Forex Time series Forecasting Using Regular AI Models

Data Science and Machine Learning (Part 24): Forex Time series Forecasting Using Regular AI Models

In the forex markets It is very challenging to predict the future trend without having an idea of the past, Very few machine learning models are capable of making the future predictions by considering past values. In this article, we are going to discuss how we can use classical(Non-time series) Artificial Intelligence models to beat the market
preview
MQL5 Wizard Techniques you should know (Part 23): CNNs

MQL5 Wizard Techniques you should know (Part 23): CNNs

Convolutional Neural Networks are another machine learning algorithm that tend to specialize in decomposing multi-dimensioned data sets into key constituent parts. We look at how this is typically achieved and explore a possible application for traders in another MQL5 wizard signal class.
preview
Developing a multi-currency Expert Advisor (Part 3): Architecture revision

Developing a multi-currency Expert Advisor (Part 3): Architecture revision

We have already made some progress in developing a multi-currency EA with several strategies working in parallel. Considering the accumulated experience, let's review the architecture of our solution and try to improve it before we go too far ahead.
preview
MQL5 Trading Toolkit (Part 1): Developing A Positions Management EX5 Library

MQL5 Trading Toolkit (Part 1): Developing A Positions Management EX5 Library

Learn how to create a developer's toolkit for managing various position operations with MQL5. In this article, I will demonstrate how to create a library of functions (ex5) that will perform simple to advanced position management operations, including automatic handling and reporting of the different errors that arise when dealing with position management tasks with MQL5.
preview
A Step-by-Step Guide on Trading the Break of Structure (BoS) Strategy

A Step-by-Step Guide on Trading the Break of Structure (BoS) Strategy

A comprehensive guide to developing an automated trading algorithm based on the Break of Structure (BoS) strategy. Detailed information on all aspects of creating an advisor in MQL5 and testing it in MetaTrader 5 — from analyzing price support and resistance to risk management
preview
Balancing risk when trading multiple instruments simultaneously

Balancing risk when trading multiple instruments simultaneously

This article will allow a beginner to write an implementation of a script from scratch for balancing risks when trading multiple instruments simultaneously. Besides, it may give experienced users new ideas for implementing their solutions in relation to the options proposed in this article.
preview
Using optimization algorithms to configure EA parameters on the fly

Using optimization algorithms to configure EA parameters on the fly

The article discusses the practical aspects of using optimization algorithms to find the best EA parameters on the fly, as well as virtualization of trading operations and EA logic. The article can be used as an instruction for implementing optimization algorithms into an EA.
preview
Developing a multi-currency Expert Advisor (Part 2): Transition to virtual positions of trading strategies

Developing a multi-currency Expert Advisor (Part 2): Transition to virtual positions of trading strategies

Let's continue developing a multi-currency EA with several strategies working in parallel. Let's try to move all the work associated with opening market positions from the strategy level to the level of the EA managing the strategies. The strategies themselves will trade only virtually, without opening market positions.
preview
Trailing stop in trading

Trailing stop in trading

In this article, we will look at the use of a trailing stop in trading. We will assess how useful and effective it is, and how it can be used. The efficiency of a trailing stop largely depends on price volatility and the selection of the stop loss level. A variety of approaches can be used to set a stop loss.
preview
Building A Candlestick Trend Constraint Model(Part 3): Detecting changes in trends while using this system

Building A Candlestick Trend Constraint Model(Part 3): Detecting changes in trends while using this system

This article explores how economic news releases, investor behavior, and various factors can influence market trend reversals. It includes a video explanation and proceeds by incorporating MQL5 code into our program to detect trend reversals, alert us, and take appropriate actions based on market conditions. This builds upon previous articles in the series.