
Use of OpenCL is therefore very beneficial when dealing with tasks associated with laborious and resource consuming computations.įor example, speaking of MQL5, performance gain can be very rewarding when handling a certain script (indicator or Expert Advisor) that performs a complex and lengthy analysis of historical data by several symbols and time frames (it should be noted here that a MQL5 program that is intended to employ parallel execution should be written in a special way using OpenCL API). In other words, OpenCL makes it possible to utilize all CPU cores or GPU's enormous computing capacity when calculating a task, thus reducing program execution time. This standard allows you to develop applications that could be run in parallel on GPUs or CPUs with different architecture in a heterogeneous system. OpenCL is the open standard for parallel programming developed by the Khronos Group consortium in 2008.
OpenCL: From Naive Towards More Insightful Programming. OpenCL: The Bridge to Parallel Worlds and. We are not going to consider the particulars of writing programs for OpenCL in MQL5 as the website already features two great articles that cover this subject: In this article, we will show you how to install OpenCL on your computer so you can see first-hand the advantages of using parallel computing in MQL5. That's why a lot of users were simply not able to run the Mandelbrot set script, as well as many other programs available in the munity forum. The thing is that launching of any MQL5 program that uses OpenCL requires appropriate software to be installed. However not many users have taken the advantage of using parallel computing in their Expert Advisors, indicators or scripts as they are not aware of the new possibilities offered and do not have the required knowledge. If your computer already has a suitable OpenCL device version 1.1 or higher, you can safely skip the description part and proceed directly to Performance Comparison to be able to see for yourself the performance gain for tasks that allow parallel computing. In this case, the MetaTrader 5 terminal has detected 4 methods available to launch OpenCL directly from an MQL5 program: a graphics card from NVIDIA (OpenCL 1.1) and one from AMD (OpenCL 1.2), as well as two Intel Core-i7 CPU utilization options, depending on the driver installed. Entries of any OpenCL devices found can now be seen in the Journal at the MetaTrader 5 terminal launch, as shown below. It has been over a year since it became possible to write programs for OpenCL in MQL5. OpenCL in the MetaTrader 5 Client Terminal