Skip to content
All library documents

Adding an LSTM Model to an Order Block Trading Strategy

Article MQL5 articles

Summary

The article describes a workflow for adding a machine-learning model to an existing MQL5 order block strategy that also uses Fibonacci analysis. It begins by translating the strategy into Python so its pattern detection, indicators, order handling, and risk rules can be reproduced for model training and evaluation. The stated aim is to combine the strategy’s rule-based entries with an LSTM model trained on historical price data to classify a prospective action as buy, sell, or hold.

The source includes MQL5 logic that identifies bullish and bearish candlestick patterns, stores order block levels, and places trades with stop and target prices. It refers to historical XAUUSD hourly data and a saved model, but the supplied text gives no clear out-of-sample performance metrics or detailed validation results. Claims that an LSTM could improve timing, adaptability, or risk decisions are prospective rather than demonstrated. Faithful translation, leakage controls, and testing across changing market conditions would be needed before drawing conclusions about the hybrid strategy’s value.

Key ideas

  • The workflow translates the existing MQL5 strategy into Python before adding machine learning.
  • The rule-based component identifies order blocks from candlestick patterns and uses their price levels for trade management.
  • An LSTM is intended to predict buy, sell, or hold actions from historical price data.
  • The text describes model construction but does not provide convincing performance evidence or validation details.
  • Claims of improved adaptability and trading outcomes remain unproven in the supplied material.

Tags

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