Skip to content
All library documents

Building and Testing Trading Perceptrons with MQL5 Alglib

Article MQL5 articles

Summary

The article explains how to use MQL5’s Alglib classes to build a basic perceptron for testing trading ideas in an Expert Advisor. It outlines the roles of network setup, training data, training routines and forward processing, and describes normalizing input columns with means and standard deviations calculated from training data. The Wizard can combine signal modules with assigned weights, while optimization can help select and export network parameters.

The discussion presents perceptrons as a way to model nonlinear relationships in noisy, changing markets, but it does not provide detailed performance figures in the supplied text. It suggests using cross-validation or an error measure to choose weights, and recommends more extensive testing with broker tick data. The described Alglib implementation limits networks to at most two hidden layers, which may constrain more complex applications. The article is an introductory implementation guide, not evidence that a perceptron will forecast markets reliably.

Key ideas

  • Alglib classes support network initialization, training and forward predictions within an MQL5 Expert Advisor.
  • Input data should be normalized using statistics calculated from the training set.
  • The Wizard can combine multiple signal modules by assigning each a weight.
  • Optimization or cross-validation can help select network parameters for further testing.
  • The described implementation allows no more than two hidden layers and needs broader validation.

Tags

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