Skip to content
All library documents

Training a Support Vector Machine to Generate Trading Signals

Article MQL5 code base

Summary

The document outlines a chart indicator that trains a support vector machine (SVM) to predict buy and sell signals. It selects technical indicators as model inputs, gathers historical indicator and price data, labels past opportunities according to whether trades would have succeeded, and uses those examples to train the model. The trained model then evaluates later bars to produce signals.

When attached to a chart, the indicator first displays historical trades that it treats as successful training examples. Users can adjust the input indicators, the number of inputs, which past bars are sampled, and the number of training points. The document presents the tool as a simple demonstration and recommends optimizing its settings, but it supplies no performance results or validation method. Its description does not explain how success labels are defined, how overfitting is controlled, or whether signals remain effective out of sample, so the suggested predictions should not be treated as evidence of trading profitability.

Key ideas

  • The indicator uses historical prices and technical indicators to create training examples for an SVM.
  • Past trades deemed successful are used to train the model before it generates later signals.
  • Users can vary indicator inputs, historical offsets, and the quantity of training data.
  • The document provides no performance evidence or detail on validation and label construction.

Tags

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