Home/Strategies
Pillar 03 · ML as a filter, not a black box

Use ONNX as a trade filter, not a fortune teller.

The robots that print money for retail traders don't exist. The robots that consistently filter bad setups out of an otherwise-edge strategy — those exist. This silo documents the strategy patterns where a small ONNX classifier earns its keep: regime detection, trend confirmation, probability gating.

// the patterns that work

Strategies, ranked by signal-to-noise.

01 · classifier

Market structure classification with ONNX

A three-class model (bull / bear / range) that gates entries from a rule-based EA. The features matter more than the architecture.

read →
02 · filter

AI trend filter for a classical EA

Take a working trend-following bot. Add an ONNX layer that suppresses entries when the model says "this isn't a trend." Walk through the integration.

read →
03 · gating

Probability-confidence gating in MQL5

The model gives you a probability. The naive code uses the argmax. The robust code waits for confidence to cross a threshold.

read →
04 · forecast

CNN-LSTM price forecast end-to-end

The canonical CNN-LSTM architecture from research, ported into a working EA. Training script, export, and the MQL5 integration in one piece.

read →
validation

Walk-forward validation for an ONNX EA

Test the model the way it trades: train on the past, predict the next window, roll. Rolling vs anchored, and how to ship each fold to MT5.

read →
features

Feature engineering for a forex ML model

Returns, volatility, momentum, higher-timeframe and session context - plus stationarity and normalization parity with MQL5.

read →
discipline

Avoiding overfitting in an ONNX EA backtest

Great backtest, flat live? The defenses that hold up: walk-forward, a locked holdout, simpler models, and a confidence gate.

read →
05 · debug

Why your model predicts garbage in Strategy Tester

The normalization parameters from training have to be loaded inside the Tester. Most tutorials skip this. It's why your backtest looks like noise.

read →
06 · regimes

Regime detection: when to turn the EA off

The single most under-rated use of ML in retail trading: knowing when your strategy shouldn't trade. A binary classifier that earns its keep.

read →
07 · design

ONNX as a filter vs ONNX as the whole EA

Two patterns for shipping ONNX in MT5. The filter pattern wins for most retail use cases; standalone is high-ceiling but riskier. Trade-offs and the hybrid most quants actually use.

read →

Test it on someone else's capital first.

The strategy survives backtests? Run it through a funded-account challenge before risking your own money. Some firms allow ONNX EAs explicitly.

Compare prop firm rules →