We are working on native OpenCL support directly in MQL5. In a couple of builds it will be available publicly.
Here is a small working example of calculation of the Mandelbrot fractal in OpenCL which dramatically speeds up calculations as compared to the software implementation. The calculation in OpenCL is 100 times faster.
To be able to run the script on your own, the library with functions must be included: CLContextCreate, CLProgramCreate, CLKernelCreate, CLBufferCreate, etc. What is this library and where can I get it?
In order to run the script, you need to include a library with functions: CLContextCreate, CLProgramCreate, CLKernelCreate, CLBufferCreate, etc. What is this library and where can I get it?
In order to run the script, you need to include a library with functions: CLContextCreate, CLProgramCreate, CLKernelCreate, CLBufferCreate, etc. What is this library and where can I get it?
You do not need any libraries; OpenCL support in MQL5 is now native.
There are no additional DLL files in the terminal. Upon loading, the terminal detects the presence of OpenCL interfaces on the system (they are added by the video card driver). All video card manufacturers (NVIDIA, AMD, Intel) that provide OpenCL are supported.
It is important that video card drivers be up-to-date with OpenCL interfaces support enabled. Often, bundled drivers with computers either do not have OpenCL support or are so old that they contain critical errors in the implementation of OpenCL/CUDA libraries. This can usually be remedied by installing the latest drivers from the manufacturer's website.
We are working on native OpenCL support directly in MQL5. It will be available publicly in a couple of builds.
That's great news! Thank you.
TheXpert:
Renat, you should write an article now - how to use, features, where to get the hardware, etc.
Yes, an article is needed.
Renat, you should just write an article on how to use it, what is special about it, where to get the drivers and so on.
There are already a lot of materials on OpenCL on the web.
You can start from here:
All OpenCL functions are used equally in MQL5, so it won't be a problem to transfer descriptions from other articles to MQL5 soil.
Yes, the article is necessary.
Does this mean that "video" agents can be connected to the metatester? Will Opencl, if possible, be used in all/most EAs, or only in those which will be written ("ground up") to use video cards?
Yes, it will be possible to plug in - that is the intention.
If OpenCL devices will not be on the agent, the software implementation will automatically work.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
We are working on native OpenCL support directly in MQL5. In a couple of builds it will be available publicly.
Here is a small working example of calculation of the Mandelbrot fractal in OpenCL which dramatically speeds up calculations as compared to the software implementation. The calculation in OpenCL is 100 times faster.