Skip to content
All library documents

Training a Neural Network to Complement a Trend Trading System

Article MQL5 code base

Summary

The document describes a hybrid trading system in which a neural network is trained to handle conditions that a basic trading system (BTS) does not address well. Its example assumes the base system follows trends, while neural network components identify short and long opportunities intended to supplement it, including counter-trend behavior. A two-layer design uses two lower perceptrons for directional decisions and an upper perceptron to combine them, with an additional undefined state when no entry is indicated.

Training proceeds in stages: first optimize the base system’s CCI period and trade exits, then optimize the short and long perceptrons separately, and finally train the upper layer. Each stage uses genetic optimization, with open-prices-only modeling chosen for speed because the expert advisor manages new bars. The document provides parameter ranges and an optimization workflow, but no out-of-sample results or evidence that the method generalizes. Its suggestion to re-optimize after losses treats them as evidence of market change, a rule that could also respond to ordinary variance and should be validated carefully.

Key ideas

  • The neural network is intended to add capabilities that the base trading system lacks.
  • The example pairs a trend system with perceptrons for short and long decisions.
  • Optimization is divided into stages for the base system, directional perceptrons, and combining layer.
  • The workflow uses genetic optimization and a fast open-prices-only simulation model.
  • The document reports no validation results, so the approach’s robustness is unknown.

Tags

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