Skip to content
All library documents

MQL5 Activation Functions and Their Derivatives for Neural Networks

Article MQL5 articles

Summary

This technical overview explains how activation functions map neural network inputs to outputs and why their derivatives matter for backpropagation. It presents formulas and MQL5 usage examples for functions including ELU, exponential, GELU, sigmoid, tanh, ReLU variants, Swish, and Softmax, with notes on optional parameters such as slope or threshold controls.

The document also describes plotting each function alongside its derivative and explains that Softmax operates across a whole vector, producing outputs that sum to one and making it useful for classification output layers. It is a reference for implementing these functions in MQL5, not a trading strategy or a comparison of model performance. The article provides no trading tests or evidence that a particular activation function improves market predictions; its remarks about nonlinearity and ReLU are general context.

Key ideas

  • Activation functions transform neuron inputs into outputs, and their derivatives support error backpropagation.
  • The article lists MQL5 implementations for common smooth, piecewise, and parameterized activation functions.
  • Softmax depends on all values in an input vector and normalizes the outputs to sum to one.
  • The examples document implementation choices but do not evaluate trading performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.