Filtering EMA Crossover Trades with an AutoML Confidence Model
Summary
The article describes an end-to-end workflow for training a model to screen EMA crossover trades and deploying it in an MQL5 Expert Advisor. It fetches XAUUSD hourly history, derives nine price and indicator features, simulates crossover trades, and labels each by whether it closes in profit. FLAML then selects among tree-based models, and the chosen model is exported to ONNX for use within MetaTrader 5.
At runtime, the EA calculates the matching features on a closed bar and trades only when the model’s predicted profit probability clears a configurable threshold. The described position management includes risk-based sizing, ATR stops, and exits on an opposing crossover. The article also outlines a Strategy Tester comparison with the model gate enabled and disabled. It presents an implementation workflow, not evidence of durable profitability: results depend on the sample, labeling and feature choices, and validation method. The author notes that the framework can be adapted to other signals, but the document gives no independent performance proof.
Key ideas
- The model learns from simulated EMA crossover outcomes labeled as profitable or unprofitable.
- Nine engineered features must be computed consistently in Python and MQL5 for deployment.
- FLAML automates model selection before the selected estimator is exported to ONNX.
- A configurable probability threshold controls whether a detected crossover becomes a trade.
- A Strategy Tester comparison with the model gate disabled can assess its contribution.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.