Skip to content
All library documents

Proactive Pattern-Based Position Sizing with a Suffix Automaton and Autoencoder

Article MQL5 articles

Summary

This article proposes a custom MQL5 money-management class for traders whose decisions depend on recurring price patterns rather than volume accumulation. It converts price changes into a discrete sequence of up, down, or flat states. A suffix automaton indexes historical sequences and estimates how familiar a current setup is, providing a possible basis for scaling position size. The author presents the automaton as a way to avoid repeatedly scanning long histories.

An autoencoder supplies a second check: it reconstructs recent continuous price structure, and reconstruction error is treated as a signal that the pattern has become anomalous. The design combines sequence familiarity and structural integrity to adjust exposure before closed-trade losses accumulate. The article describes tests that suggest the components may help with sizing and drawdown control, but the excerpt does not provide enough detail on test methodology, market coverage, or robust out-of-sample evidence to establish an advantage. Its claims should therefore be treated as a proposed risk-management approach.

Key ideas

  • Price changes are encoded as up, down, or flat symbols to represent recent market sequences.
  • A suffix automaton indexes historical sequences and measures familiarity with a current pattern.
  • An autoencoder’s reconstruction error is used as a signal of structural anomalies.
  • The proposed money-management class adjusts exposure using pattern familiarity and market structure.
  • The article reports suggestive tests but does not establish broad out-of-sample effectiveness.

Tags

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