Since recently, MetaTrader 5 features a new program type known as a service. According to the developer, services allow users to create custom price feeds for the terminal, i.e. to implement price delivery from external systems in real time, just like it is implemented on brokers' trade servers. This is not the only feature of services.
In this article, I will consider the nuances of working with services. The article is focused mostly on beginners. Based on this, I tried to make the code completely reproducible and more complicated from one example to another.
The article describes the versatile capabilities of services — MQL5 programs that do not require binding graphs. I will also highlight the differences of services from other MQL5 programs and emphasize the nuances of the developer's work with services. As examples, the reader is offered various tasks covering a wide range of functionality that can be implemented as a service.
Collections of ordered data, wherein all elements have the same type, are usually operated through Arrays, in which each element can be accessed by its index. Arrays are widely used in solving various linear algebra problems, in mathematical modeling tasks, in machine learning, etc. In general terms, the solution of such problems is based on mathematical operations using matrices and vectors, with which very complex transformations can be compactly written in the form of simple formulas. Programming of such operations requires good knowledge in mathematics along with the ability to write complex nested loops. Debugging and bug fixing in such programs can be quite challenging.
By using special data types 'matrix' and 'vector', it is possible to create the code which is very close to mathematical notation while avoiding the need to create nested loops or to mind correct indexing of arrays in calculations. In this article, we will see how to create, initialize, and use matrix and vector objects in MQL5.
In python a Utils class is a general purposed utility class with functions and lines of code which we can reuse without creating an instance of a class.
The Standard library for matrices provides us with some very important features and methods that we can use to Initialize, transform, manipulate matrices, and much more but like any other libraries ever built it can be extended to perform extra stuff that might be necessary/needed in some of the applications.
The update provides web terminal improvements. We have implemented a set of color templates for the web terminal interface and have enhanced the symbol specification window. Also, the new version provides General Matrix Multiplication (GeMM) in MQL5.
This algorithm speeds up calculations on most processors. The new algorithm is currently supported in the matrix::GeMM method.
The MetaTrader 5 platform update will be released on Friday, March 17, 2023. The new version features the following updates:
MetaTrader 5 Web Terminal build 3640
Added UI translations into 10 widely spoken languages: Simplified and Traditional Chinese, French, German, Italian, Japanese, Korean, Spanish, Turkish and Russian. This list will be further expanded in future versions. To switch the language, use the relevant menu:
Optimized connection mechanism to the trade server.
MetaTrader 5 Client Terminal build 3640
MQL5: New value in the ENUM_CHART_PROPERTY_INTEGER enumeration — CHART_SHOW_TRADE_HISTORY. The property controls the display of trades from the trading history on the chart. Use the ChartGetInteger and ChartSetInteger functions to obtain and set the property. For further details about the trades display on the chart, please read the platform documentation.
MetaEditor: Fixed interface freezing which could occur during file compilation under certain conditions.
Fixed errors reported in crash logs.
The update will be available through the Live Update system.
MQL5: Fixed checking global variables. When declaring identical variables in different namespaces, the compiler gave an erroneous warning that the variable was already declared.
Updated translations of the user interface.
MetaTrader 5 Web Terminal build 3660
Added user interface translation into Portuguese. The web terminal is now available in 12 languages.
OpenCL is a framework that provides an open standard for writing programs that can run on different types of hardware platforms, such as CPUs, GPUs, and specialized processing units. It allows software developers to write code in a single language that can be executed on multiple devices, regardless of their vendor or architecture.
OpenCL comprises a runtime and programming interface that offer a level of platform independence, allowing developers to write code that can be executed on any OpenCL-enabled device. Moreover, it provides a set of low-level APIs that enable developers to control the device, memory, and kernel execution explicitly, giving them fine-grained control over their applications.
OpenCL has extensive applications in scientific computing, image and video processing, machine learning, and other domains. It enhances the performance of applications by utilizing the parallel computing power of multiple devices, enabling faster and more efficient execution.
One of the most significant advantages of OpenCL is its ability to utilize the computing power of GPUs, which can perform specific types of calculations much faster than CPUs. This makes it particularly useful for applications that involve heavy calculations, such as scientific simulations, image and video processing, and machine learning.
Overall, OpenCL provides a flexible framework for developing applications that can leverage the power of different types of computing devices, making it a valuable tool for developers working on high-performance computing applications.
Collections of ordered data, wherein all elements have the same type, are usually operated through Arrays, in which each element can be accessed by its index. Arrays are widely used in solving various linear algebra problems, in mathematical modeling tasks, in machine learning, etc. In general terms, the solution of such problems is based on mathematical operations using matrices and vectors, with which very complex transformations can be compactly written in the form of simple formulas. Programming of such operations requires good knowledge in mathematics along with the ability to write complex nested loops. Debugging and bug fixing in such programs can be quite challenging.
By using special data types 'matrix' and 'vector', it is possible to create the code which is very close to mathematical notation while avoiding the need to create nested loops or to mind correct indexing of arrays in calculations. In this article, we will see how to create, initialize, and use matrix and vector objects in MQL5.
In python a Utils class is a general purposed utility class with functions and lines of code which we can reuse without creating an instance of a class.
The Standard library for matrices provides us with some very important features and methods that we can use to Initialize, transform, manipulate matrices, and much more but like any other libraries ever built it can be extended to perform extra stuff that might be necessary/needed in some of the applications.
In this article, we will briefly recall the theory of backpropagation networks and will create universal classes for building networks using this theory: the above formulas will be almost identically reflected in the source code. Thus, beginners can go through all steps while learning this technology, without having to look for third-party publications.
If you already know the theory, then you can safely move on to the second part of the article, which discusses the practical use of classes in a script, an indicator, and an Expert Advisor.
The article describes the theory and practice of applying the backpropagation algorithm in MQL5 using matrices. It provides ready-made classes along with script, indicator and Expert Advisor examples.
For stable trading, it is usually recommended to diversify both the traded instruments and the trading strategies. The same refers to machine learning models: it is easier to create several simpler models that one complex one. But it can be difficult to assemble these models into one ONNX model. In this article, we will consider one of the ensembles called the voting classifier. We will show you how easy it is to implement such an ensemble.
ONNX (Open Neural Network eXchange) is an open format built to represent neural networks. In this article, we will show how to use two ONNX models in one Expert Advisor simultaneously.
MQL5 Cookbook - Services
Since recently, MetaTrader 5 features a new program type known as a service. According to the developer, services allow users to create custom price feeds for the terminal, i.e. to implement price delivery from external systems in real time, just like it is implemented on brokers' trade servers. This is not the only feature of services.
In this article, I will consider the nuances of working with services. The article is focused mostly on beginners. Based on this, I tried to make the code completely reproducible and more complicated from one example to another.
Matrices and vectors in MQL5
By using special data types 'matrix' and 'vector', it is possible to create the code which is very close to mathematical notation while avoiding the need to create nested loops or to mind correct indexing of arrays in calculations. In this article, we will see how to create, initialize, and use matrix and vector objects in MQL5.
Matrix Utils, Extending the Matrices and Vector Standard Library Functionality - the article
In python a Utils class is a general purposed utility class with functions and lines of code which we can reuse without creating an instance of a class.
The Standard library for matrices provides us with some very important features and methods that we can use to Initialize, transform, manipulate matrices, and much more but like any other libraries ever built it can be extended to perform extra stuff that might be necessary/needed in some of the applications.
This algorithm speeds up calculations on most processors. The new algorithm is currently supported in the matrix::GeMM method.
Forum on trading, automated trading systems and testing trading strategies
MetaTrader 5 Platform update build 3640: Web Terminal in 11 languages
MetaQuotes, 2023.03.16 17:37
The MetaTrader 5 platform update will be released on Friday, March 17, 2023. The new version features the following updates:
MetaTrader 5 Web Terminal build 3640
MetaTrader 5 Client Terminal build 3640
The update will be available through the Live Update system.
Forum on trading, automated trading systems and testing trading strategies
MetaTrader 5 Platform update build 3660: Improvements and fixes
MetaQuotes, 2023.03.23 09:48
The MetaTrader 5 platform update will be released on Friday, March 24, 2023. It features a number of platform fixes and improvements.
MetaTrader 5 Client Terminal build 3660
MetaTrader 5 Web Terminal build 3660
The update will be available through the Live Update system.
Greetings, I have iMac installed MT5, but I can't install my indicator, the files are not copied. Why?
MT5 is not on the parallel, i.e. there is no vindos.
How to solve this problem?
Forum on trading, automated trading systems and testing trading strategies
OpenCL in trading
MetaQuotes, 2023.04.10 11:42
OpenCL is a framework that provides an open standard for writing programs that can run on different types of hardware platforms, such as CPUs, GPUs, and specialized processing units. It allows software developers to write code in a single language that can be executed on multiple devices, regardless of their vendor or architecture.
OpenCL comprises a runtime and programming interface that offer a level of platform independence, allowing developers to write code that can be executed on any OpenCL-enabled device. Moreover, it provides a set of low-level APIs that enable developers to control the device, memory, and kernel execution explicitly, giving them fine-grained control over their applications.
OpenCL has extensive applications in scientific computing, image and video processing, machine learning, and other domains. It enhances the performance of applications by utilizing the parallel computing power of multiple devices, enabling faster and more efficient execution.
One of the most significant advantages of OpenCL is its ability to utilize the computing power of GPUs, which can perform specific types of calculations much faster than CPUs. This makes it particularly useful for applications that involve heavy calculations, such as scientific simulations, image and video processing, and machine learning.
Overall, OpenCL provides a flexible framework for developing applications that can leverage the power of different types of computing devices, making it a valuable tool for developers working on high-performance computing applications.
MQL5 supports OpenCL since 2016, for the deails see chapter Working with OpenCL of MQL5 Reference. See also Class for Working with OpenCL programs.
The examples of OpenCL use can be found in MQL5\Scripts\Examples\OpenCL.
Here is an Seascape example of OpenCL
See also articles:
OpenCL: From Naive Towards More Insightful Programming
How to Install and Use OpenCL for Calculations
Forum on trading, automated trading systems and testing trading strategies
How to Start with Metatrader 5
Sergey Golubev, 2022.02.12 07:49
Matrices and vectors in MQL5By using special data types 'matrix' and 'vector', it is possible to create the code which is very close to mathematical notation while avoiding the need to create nested loops or to mind correct indexing of arrays in calculations. In this article, we will see how to create, initialize, and use matrix and vector objects in MQL5.
Forum on trading, automated trading systems and testing trading strategies
How to Start with Metatrader 5
Sergey Golubev, 2023.02.11 03:41
Matrix Utils, Extending the Matrices and Vector Standard Library Functionality - the article
In python a Utils class is a general purposed utility class with functions and lines of code which we can reuse without creating an instance of a class.
The Standard library for matrices provides us with some very important features and methods that we can use to Initialize, transform, manipulate matrices, and much more but like any other libraries ever built it can be extended to perform extra stuff that might be necessary/needed in some of the applications.
In this article, we will briefly recall the theory of backpropagation networks and will create universal classes for building networks using this theory: the above formulas will be almost identically reflected in the source code. Thus, beginners can go through all steps while learning this technology, without having to look for third-party publications.
If you already know the theory, then you can safely move on to the second part of the article, which discusses the practical use of classes in a script, an indicator, and an Expert Advisor.
An example of how to ensemble ONNX models in MQL5
For stable trading, it is usually recommended to diversify both the traded instruments and the trading strategies. The same refers to machine learning models: it is easier to create several simpler models that one complex one. But it can be difficult to assemble these models into one ONNX model. In this article, we will consider one of the ensembles called the voting classifier. We will show you how easy it is to implement such an ensemble.