Skip to content
All library documents

Supervised Learning for Moving Average and Stochastic Signals

Article MQL5 articles

Summary

This article explores ten signal patterns that combine a moving average, used as a trend indicator, with the Stochastic Oscillator, used for momentum. It frames the patterns as a supervised learning task: neural networks are trained in Python on labelled data, then exported to ONNX for testing in MetaTrader 5. The stated dataset uses daily EUR/JPY prices from 2023 for training and the same pair in 2024 for forward-walk evaluation.

The discussion places supervised training alongside reinforcement learning and inference, and describes cross-validation as a check on model loss. It also argues that this measure alone cannot establish how well model weights generalize, so forward testing is used as an additional assessment. The excerpt reports that one tested pattern appeared unpromising on an equal-weighted basis, while other patterns had more favorable walks. It does not provide complete performance statistics here, and cautions against combining patterns without understanding how their signals may conflict or affect margin.

Key ideas

  • The strategy tests ten patterns that pair moving-average trend signals with Stochastic momentum signals.
  • Neural networks are trained on labelled data in Python and exported for MetaTrader 5 testing.
  • The stated training and forward-walk periods use daily EUR/JPY data from 2023 and 2024, respectively.
  • Cross-validation loss is supplemented with forward testing because loss alone may not show how well weights generalize.
  • The article advises caution when combining patterns because their trades may conflict and affect margin.

Tags

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