MetaTrader 5 runs EAs in a single thread; indicators get separate symbol threads. Heavy indicator work can delay tick processing, so parallel compute is typically pushed to DLLs or OpenCL. OpenCL avoids DLL permissions and keeps deployment to one EX5, with compute placed on CPU or GPU.
Neural nets allow parallelism per neuron inside a layer, while layers still run sequentially. This design uses OpenCL kernels with vector ops: FeedForward, output gradient, hidden gradient, and UpdateWeights in a 2D thread space.
Implementation centers on one-dimensional OpenCL buffers, a CBufferDouble wrapper, a COpenCLMy extension for dynamic buffer management, and a CNeuronBaseOCL layer object. Testing highlights that COpenCL::Execute queues kernels, so reads are needed to force completion.
👉 Read | AlgoBook | @mql5dev

44
10
2August 27, 2026 23.6K 17