Articles on MetaTrader 5 integration using MQL5

icon

Traders meet interesting challenges which often require an innovative approach. This category features articles that offer the most unexpected solutions for evaluating, analyzing and processing price data and trading results. The articles describe various integration solutions, including connection of databases and ICQ, use of OpenCL and social networks, use of Delphi and C#.

Read on to learn how to use specialized mathematical and neural packages, and much more. Become an author and share unique ideas with the MQL5.community members.

Add a new article
latest | best
preview
Introduction to Connexus (Part 1): How to Use the WebRequest Function?

Introduction to Connexus (Part 1): How to Use the WebRequest Function?

This article is the beginning of a series of developments for a library called “Connexus” to facilitate HTTP requests with MQL5. The goal of this project is to provide the end user with this opportunity and show how to use this helper library. I intended to make it as simple as possible to facilitate study and to provide the possibility for future developments.
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
Creating an MQL5-Telegram Integrated Expert Advisor (Part 6): Adding Responsive Inline Buttons

Creating an MQL5-Telegram Integrated Expert Advisor (Part 6): Adding Responsive Inline Buttons

In this article, we integrate interactive inline buttons into an MQL5 Expert Advisor, allowing real-time control via Telegram. Each button press triggers specific actions and sends responses back to the user. We also modularize functions for handling Telegram messages and callback queries efficiently.
preview
MQL5 Wizard Techniques you should know (Part 38): Bollinger Bands

MQL5 Wizard Techniques you should know (Part 38): Bollinger Bands

Bollinger Bands are a very common Envelope Indicator used by a lot of traders to manually place and close trades. We examine this indicator by considering as many of the different possible signals it does generate, and see how they could be put to use in a wizard assembled Expert Advisor.
preview
Applying Localized Feature Selection in Python and MQL5

Applying Localized Feature Selection in Python and MQL5

This article explores a feature selection algorithm introduced in the paper 'Local Feature Selection for Data Classification' by Narges Armanfard et al. The algorithm is implemented in Python to build binary classifier models that can be integrated with MetaTrader 5 applications for inference.
preview
Creating a Trading Administrator Panel in MQL5 (Part II): Enhancing Responsiveness and Quick Messaging

Creating a Trading Administrator Panel in MQL5 (Part II): Enhancing Responsiveness and Quick Messaging

In this article, we will enhance the responsiveness of the Admin Panel that we previously created. Additionally, we will explore the significance of quick messaging in the context of trading signals.
preview
Creating an MQL5-Telegram Integrated Expert Advisor (Part 5): Sending Commands from Telegram to MQL5 and Receiving Real-Time Responses

Creating an MQL5-Telegram Integrated Expert Advisor (Part 5): Sending Commands from Telegram to MQL5 and Receiving Real-Time Responses

In this article, we create several classes to facilitate real-time communication between MQL5 and Telegram. We focus on retrieving commands from Telegram, decoding and interpreting them, and sending appropriate responses back. By the end, we ensure that these interactions are effectively tested and operational within the trading environment
preview
Developing a multi-currency Expert Advisor (Part 9): Collecting optimization results for single trading strategy instances

Developing a multi-currency Expert Advisor (Part 9): Collecting optimization results for single trading strategy instances

Let's outline the main stages of the EA development. One of the first things to be done will be to optimize a single instance of the developed trading strategy. Let's try to collect all the necessary information about the tester passes during the optimization in one place.
preview
Creating an MQL5-Telegram Integrated Expert Advisor (Part 4): Modularizing Code Functions for Enhanced Reusability

Creating an MQL5-Telegram Integrated Expert Advisor (Part 4): Modularizing Code Functions for Enhanced Reusability

In this article, we refactor the existing code used for sending messages and screenshots from MQL5 to Telegram by organizing it into reusable, modular functions. This will streamline the process, allowing for more efficient execution and easier code management across multiple instances.
preview
Brain Storm Optimization algorithm (Part II): Multimodality

Brain Storm Optimization algorithm (Part II): Multimodality

In the second part of the article, we will move on to the practical implementation of the BSO algorithm, conduct tests on test functions and compare the efficiency of BSO with other optimization methods.
preview
Developing a multi-currency Expert Advisor (Part 8): Load testing and handling a new bar

Developing a multi-currency Expert Advisor (Part 8): Load testing and handling a new bar

As we progressed, we used more and more simultaneously running instances of trading strategies in one EA. Let's try to figure out how many instances we can get to before we hit resource limitations.
preview
Brain Storm Optimization algorithm (Part I): Clustering

Brain Storm Optimization algorithm (Part I): Clustering

In this article, we will look at an innovative optimization method called BSO (Brain Storm Optimization) inspired by a natural phenomenon called "brainstorming". We will also discuss a new approach to solving multimodal optimization problems the BSO method applies. It allows finding multiple optimal solutions without the need to pre-determine the number of subpopulations. We will also consider the K-Means and K-Means++ clustering methods.
preview
Creating an MQL5-Telegram Integrated Expert Advisor (Part 3): Sending Chart Screenshots with Captions from MQL5 to Telegram

Creating an MQL5-Telegram Integrated Expert Advisor (Part 3): Sending Chart Screenshots with Captions from MQL5 to Telegram

In this article, we create an MQL5 Expert Advisor that encodes chart screenshots as image data and sends them to a Telegram chat via HTTP requests. By integrating photo encoding and transmission, we enhance the existing MQL5-Telegram system with visual trading insights directly within Telegram.
preview
Creating a Trading Administrator Panel in MQL5 (Part I): Building a Messaging Interface

Creating a Trading Administrator Panel in MQL5 (Part I): Building a Messaging Interface

This article discusses the creation of a Messaging Interface for MetaTrader 5, aimed at System Administrators, to facilitate communication with other traders directly within the platform. Recent integrations of social platforms with MQL5 allow for quick signal broadcasting across different channels. Imagine being able to validate sent signals with just a click—either "YES" or "NO." Read on to learn more.
preview
Developing a multi-currency Expert Advisor (Part 7): Selecting a group based on forward period

Developing a multi-currency Expert Advisor (Part 7): Selecting a group based on forward period

Previously, we evaluated the selection of a group of trading strategy instances, with the aim of improving the results of their joint operation, only on the same time period, in which the optimization of individual instances was carried out. Let's see what happens in the forward period.
preview
Integrating MQL5 with data processing packages (Part 2): Machine Learning and Predictive Analytics

Integrating MQL5 with data processing packages (Part 2): Machine Learning and Predictive Analytics

In our series on integrating MQL5 with data processing packages, we delve in to the powerful combination of machine learning and predictive analysis. We will explore how to seamlessly connect MQL5 with popular machine learning libraries, to enable sophisticated predictive models for financial markets.
preview
Population optimization algorithms: Bird Swarm Algorithm (BSA)

Population optimization algorithms: Bird Swarm Algorithm (BSA)

The article explores the bird swarm-based algorithm (BSA) inspired by the collective flocking interactions of birds in nature. The different search strategies of individuals in BSA, including switching between flight, vigilance and foraging behavior, make this algorithm multifaceted. It uses the principles of bird flocking, communication, adaptability, leading and following to efficiently find optimal solutions.
preview
MQL5 Integration: Python

MQL5 Integration: Python

Python is a well-known and popular programming language with many features, especially in the fields of finance, data science, Artificial Intelligence, and Machine Learning. Python is a powerful tool that can be useful in trading as well. MQL5 allows us to use this powerful language as an integration to get our objectives done effectively. In this article, we will share how we can use Python as an integration in MQL5 after learning some basic information about Python.
preview
Developing a robot in Python and MQL5 (Part 1): Data preprocessing

Developing a robot in Python and MQL5 (Part 1): Data preprocessing

Developing a trading robot based on machine learning: A detailed guide. The first article in the series deals with collecting and preparing data and features. The project is implemented using the Python programming language and libraries, as well as the MetaTrader 5 platform.
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
Creating an MQL5-Telegram Integrated Expert Advisor (Part 2): Sending Signals from MQL5 to Telegram

Creating an MQL5-Telegram Integrated Expert Advisor (Part 2): Sending Signals from MQL5 to Telegram

In this article, we create an MQL5-Telegram integrated Expert Advisor that sends moving average crossover signals to Telegram. We detail the process of generating trading signals from moving average crossovers, implementing the necessary code in MQL5, and ensuring the integration works seamlessly. The result is a system that provides real-time trading alerts directly to your Telegram group chat.
preview
Creating an MQL5-Telegram Integrated Expert Advisor (Part 1): Sending Messages from MQL5 to Telegram

Creating an MQL5-Telegram Integrated Expert Advisor (Part 1): Sending Messages from MQL5 to Telegram

In this article, we create an Expert Advisor (EA) in MQL5 to send messages to Telegram using a bot. We set up the necessary parameters, including the bot's API token and chat ID, and then perform an HTTP POST request to deliver the messages. Later, we handle the response to ensure successful delivery and troubleshoot any issues that arise in case of failure. This ensures we send messages from MQL5 to Telegram via the created bot.
preview
Time series clustering in causal inference

Time series clustering in causal inference

Clustering algorithms in machine learning are important unsupervised learning algorithms that can divide the original data into groups with similar observations. By using these groups, you can analyze the market for a specific cluster, search for the most stable clusters using new data, and make causal inferences. The article proposes an original method for time series clustering in Python.
preview
Integrating MQL5 with data processing packages (Part 1): Advanced Data analysis and Statistical Processing

Integrating MQL5 with data processing packages (Part 1): Advanced Data analysis and Statistical Processing

Integration enables seamless workflow where raw financial data from MQL5 can be imported into data processing packages like Jupyter Lab for advanced analysis including statistical testing.
preview
Role of random number generator quality in the efficiency of optimization algorithms

Role of random number generator quality in the efficiency of optimization algorithms

In this article, we will look at the Mersenne Twister random number generator and compare it with the standard one in MQL5. We will also find out the influence of the random number generator quality on the results of optimization algorithms.
preview
Twitter Sentiment Analysis with Sockets

Twitter Sentiment Analysis with Sockets

This innovative trading bot integrates MetaTrader 5 with Python to leverage real-time social media sentiment analysis for automated trading decisions. By analyzing Twitter sentiment related to specific financial instruments, the bot translates social media trends into actionable trading signals. It utilizes a client-server architecture with socket communication, enabling seamless interaction between MT5's trading capabilities and Python's data processing power. The system demonstrates the potential of combining quantitative finance with natural language processing, offering a cutting-edge approach to algorithmic trading that capitalizes on alternative data sources. While showing promise, the bot also highlights areas for future enhancement, including more advanced sentiment analysis techniques and improved risk management strategies.
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
Population optimization algorithms: Whale Optimization Algorithm (WOA)

Population optimization algorithms: Whale Optimization Algorithm (WOA)

Whale Optimization Algorithm (WOA) is a metaheuristic algorithm inspired by the behavior and hunting strategies of humpback whales. The main idea of WOA is to mimic the so-called "bubble-net" feeding method, in which whales create bubbles around prey and then attack it in a spiral motion.
preview
Building A Candlestick Trend Constraint Model (Part 6): All in one integration

Building A Candlestick Trend Constraint Model (Part 6): All in one integration

One major challenge is managing multiple chart windows of the same pair running the same program with different features. Let's discuss how to consolidate several integrations into one main program. Additionally, we will share insights on configuring the program to print to a journal and commenting on the successful signal broadcast on the chart interface. Find more information in this article as we progress the article series.
preview
Price Driven CGI Model: Theoretical Foundation

Price Driven CGI Model: Theoretical Foundation

Let's discuss the data manipulation algorithm, as we dive deeper into conceptualizing the idea of using price data to drive CGI objects. Think about transferring the effects of events, human emotions and actions on financial asset prices to a real-life model. This study delves into leveraging price data to influence the scale of a CGI object, controlling growth and emotions. These visible effects can establish a fresh analytical foundation for traders. Further insights are shared in the article.
preview
Using JSON Data API in your MQL projects

Using JSON Data API in your MQL projects

Imagine that you can use data that is not found in MetaTrader, you only get data from indicators by price analysis and technical analysis. Now imagine that you can access data that will take your trading power steps higher. You can multiply the power of the MetaTrader software if you mix the output of other software, macro analysis methods, and ultra-advanced tools through the ​​API data. In this article, we will teach you how to use APIs and introduce useful and valuable API data services.
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
Building A Candlestick Trend Constraint Model (Part 5): Notification System (Part III)

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

This part of the article series is dedicated to integrating WhatsApp with MetaTrader 5 for notifications. We have included a flow chart to simplify understanding and will discuss the importance of security measures in integration. The primary purpose of indicators is to simplify analysis through automation, and they should include notification methods for alerting users when specific conditions are met. Discover more in this article.
preview
Developing an MQL5 RL agent with RestAPI integration (Part 4): Organizing functions in classes in MQL5

Developing an MQL5 RL agent with RestAPI integration (Part 4): Organizing functions in classes in MQL5

This article discusses the transition from procedural coding to object-oriented programming (OOP) in MQL5 with an emphasis on integration with the REST API. Today we will discuss how to organize HTTP request functions (GET and POST) into classes. We will take a closer look at code refactoring and show how to replace isolated functions with class methods. The article contains practical examples and tests.
preview
Propensity score in causal inference

Propensity score in causal inference

The article examines the topic of matching in causal inference. Matching is used to compare similar observations in a data set. This is necessary to correctly determine causal effects and get rid of bias. The author explains how this helps in building trading systems based on machine learning, which become more stable on new data they were not trained on. The propensity score plays a central role and is widely used in causal inference.
preview
Population optimization algorithms: Resistance to getting stuck in local extrema (Part I)

Population optimization algorithms: Resistance to getting stuck in local extrema (Part I)

This article presents a unique experiment that aims to examine the behavior of population optimization algorithms in the context of their ability to efficiently escape local minima when population diversity is low and reach global maxima. Working in this direction will provide further insight into which specific algorithms can successfully continue their search using coordinates set by the user as a starting point, and what factors influence their success.
preview
Developing a multi-currency Expert Advisor (Part 4): Pending virtual orders and saving status

Developing a multi-currency Expert Advisor (Part 4): Pending virtual orders and saving status

Having started developing a multi-currency EA, we have already achieved some results and managed to carry out several code improvement iterations. However, our EA was unable to work with pending orders and resume operation after the terminal restart. Let's add these features.
preview
The base class of population algorithms as the backbone of efficient optimization

The base class of population algorithms as the backbone of efficient optimization

The article represents a unique research attempt to combine a variety of population algorithms into a single class to simplify the application of optimization methods. This approach not only opens up opportunities for the development of new algorithms, including hybrid variants, but also creates a universal basic test stand. This stand becomes a key tool for choosing the optimal algorithm depending on a specific task.
preview
Building A Candlestick Trend Constraint Model (Part 5): Notification System (Part I)

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

We will breakdown the main MQL5 code into specified code snippets to illustrate the integration of Telegram and WhatsApp for receiving signal notifications from the Trend Constraint indicator we are creating in this article series. This will help traders, both novices and experienced developers, grasp the concept easily. First, we will cover the setup of MetaTrader 5 for notifications and its significance to the user. This will help developers in advance to take notes to further apply in their systems.