What is ONNX in the context of trading?

ONNX (Open Neural Network Exchange) is an open format for AI models that lets you create, train and deploy machine-learning models for predicting financial markets. In trading, ONNX is used to run predictive models directly inside platforms such as MetaTrader 5.

Since January 2026, MetaTrader 5 Build 5572 has added CUDA support for GPU, lazy-loading of the ONNX library and multi-GPU support — making AI-based trading bots faster and more accessible than ever.

💡 Recommended resource

If you want pre-trained ONNX models ready to install in MT5, see our AI bots guide, with models validated by backtesting and integrated risk management for forex and binary options.

How does an ONNX bot work in MT5?

The workflow of an ONNX bot has three phases:

ONNX Runtime: performance and resources

ONNX Runtime uses between 30 and 100 MB of RAM, far less than the full TensorFlow (1.7 to 4.8 GB). This means you can run AI models on a basic VPS for $5-$15/month. With the CUDA support in Build 5572, you can accelerate inference with a dedicated GPU.

Advantages of ONNX over traditional bots

⚠️ The reality of machine learning in trading

Applying ML to trading is extremely hard. Markets are non-stationary, overfitting is constant, and a model that works in backtesting can fail live. Never trust a model blindly without rigorous validation.

ONNX for binary options

In binary options, where you only need to predict the price direction (up or down) over a fixed period, ONNX is particularly useful. The model is trained as a binary classifier (call/put) with associated probabilities.

The brokers that best support automation with ONNX bots:

⚠️ Risk warning

Trading binary options carries significant risk. The majority of traders lose money. This site contains affiliate links.