The gap between a working ML model in a Python notebook and a reliable Expert Advisor running in MetaTrader is wide. Most attempts to cross it fail at integration — not because the model is wrong, but because the bridge, the feature pipeline, and the execution framework were never designed to work together.
What You Get
A complete, production-ready ML Expert Advisor for MetaTrader 4 or 5. Not just a model or a script — a functioning automated trading system built to run in live conditions.
- Feature engineering pipeline: lookahead-free, walk-forward validated, documented feature set with normalization logic
- Trained ML model: selected and validated for your strategy type (direction classification, regression, or ordinal ranking)
- Walk-forward backtest report: Sharpe ratio, Calmar ratio, max drawdown, win rate, profit factor — with equity curve and out-of-sample validation summary
- MetaTrader Expert Advisor: compiled MQL4/MQL5 file executing model signals with configurable risk parameters
- Bridge architecture (where applicable): Python-to-MetaTrader integration via the appropriate method for your setup — ZeroMQ socket, DLL export, file-based IPC, or ONNX native inference
- Full documentation: feature specification, model card, bridge setup guide, recommended retraining schedule
How It Works
- Strategy scoping: We review your discretionary rules, backtest results, or research notes to define what market behavior the model should detect — direction bias, volatility regime, session patterns, or a combination.
- Feature engineering: We design and validate the feature pipeline for your strategy type. Every feature is verified as lookahead-free. Walk-forward stability testing removes features whose predictive relationship with the target degrades across time periods.
- Model training and validation: We train candidate models on the approved feature set, evaluate them across walk-forward folds, and select the model with the most consistent out-of-sample performance. We document what the model does and does not capture.
- MetaTrader integration: We build the connection between model and execution. This ranges from native MQL5 ONNX inference (no external process required) to a ZeroMQ socket architecture for models that require Python at inference time. Architecture is chosen based on your deployment constraints.
- Backtesting and reporting: Walk-forward backtest in MetaTrader Strategy Tester, with Combinatorial Purged Cross-Validation where applicable. Results reported against a no-signal baseline.
- Delivery and handoff: All source files (Python pipeline, trained model, MQL EA), documentation, and a walkthrough of the system architecture. Retraining guidelines included.

Who This Is For
Good fit:
- You trade a systematic or semi-systematic strategy and want to test whether ML can improve entry timing, filter false signals, or adapt to changing market conditions
- You have a traditional rule-based EA that performs inconsistently and want to replace the signal logic with an ML model while keeping the execution framework
- You have a trained Python model that works in backtesting but need someone who knows both MetaTrader and ML to build the integration correctly
Not the best fit:
- You want a traditional rule-based EA without ML components — see Expert Advisor Programming
- You only need a feature pipeline audit or partial build — see ML Feature Engineering for Forex Trading for that scope, which starts at $150
What Makes This Different
Most ML trading development projects fail at the integration step. A data scientist can train a model; a MetaTrader developer can write an EA. The combination is rare. At barmenteros FX, both sides are handled in a single engagement — the feature pipeline, the model architecture, and the EA execution framework are designed to work together from the start.
Practices that prevent the most common failure modes:
Lookahead-free features, non-negotiable: every normalization step, rolling statistic, and derived feature is audited against the timestamp boundary. This is the most expensive mistake to find after training is complete. We build the pipeline correctly once.
Walk-forward validation across multiple folds, not a single split: a model that passes a single train/test split proves nothing about generalization. We measure performance across multiple out-of-sample folds and report the distribution of outcomes, not the best case.
Bridge architecture matched to deployment constraints: if your VPS has Python available, ZeroMQ or socket-based approaches give full model flexibility. If you need a standalone EA with no external dependencies, we export to ONNX for native MQL5 inference. There is no single default — the decision is documented and explained.
Source code ownership: you receive the Python pipeline, the trained model weights, and the MQL source files. No subscription, no external platform lock-in, no black box.
Pricing
ML EA projects are quoted at a fixed price after a scoping call.
| Scope | Indicative range |
|---|---|
| Single instrument, bar-based, ONNX native (no external bridge) | From $800 |
| Single instrument with Python bridge (ZeroMQ or socket) | From $1,200 |
| Multi-instrument, multi-timeframe, full walk-forward validation | From $1,800 |
| Retrain or update of an existing ML EA | From $400 |
| Feature pipeline audit only (standalone) | From $150 |
All projects: fixed price agreed before work begins. No hourly billing. 48-hour quote turnaround.
Frequently Asked Questions
What ML models do you use for forex trading?
Model selection is driven by data volume and strategy type. For direction classification on smaller datasets (under 5,000 samples), regularized logistic regression or gradient boosting (XGBoost, LightGBM) generalize more reliably than deep learning. For larger datasets or sequence-dependent strategies, LSTM or attention-based architectures are evaluated. The deciding criterion is consistent out-of-sample performance across walk-forward folds — not the model’s current reputation in ML research.
Does the EA run natively in MetaTrader or through an external bridge?
Depends on the model. MQL5 supports ONNX inference natively — if the model can be exported to ONNX, the EA is fully self-contained with no Python process, no socket connection, and no external dependency. This is the preferred architecture for simplicity and VPS reliability. If the model requires Python at inference time (unsupported ONNX operators, complex preprocessing, or policy-based RL), the EA communicates with a Python process via ZeroMQ, socket server, or file-based IPC. The architecture recommendation is made during scoping based on what you can deploy.
How long does an ML EA development project take?
Typically 2–4 weeks from project start. Simple single-instrument bar-based builds are at the shorter end. Multi-instrument builds or projects that require substantial research into feature design take longer. Timeline is stated in the project agreement before work begins — no open-ended engagements.
What do you need from me to get started?
A description of the strategy’s logic — what market condition it targets, which instruments and timeframes, any existing backtest results or rule-based version of the system. You do not need a trained model or Python code. The project starts from trading rules and research notes, not from a half-built system.
Can you improve an ML EA that isn’t performing well in live trading?
Yes, but it requires a diagnostic phase first. The most common causes of live underperformance are lookahead-biased features, overfitting to a specific time period, or a bridge architecture that introduces execution lag. The diagnostic phase identifies the root cause before any rebuild work begins. Diagnostic work is quoted at $150–$400 depending on pipeline complexity. Rebuild pricing is quoted separately once the diagnosis is confirmed.

