Most of this site is about ONNX inside MT5 against forex data. The pattern transfers cleanly to crypto on Bybit, Binance, or Kraken — same model export, same runtime, similar architectures. But the data has structural differences that matter for model design. This article walks through the four big ones.
What's in this article
24/7 markets — no weekly close
Forex markets close on weekends; crypto doesn't. Two consequences for ML:
- No daily-bar effect: the typical "open of London/NY session" features used in forex don't translate. Crypto markets have continuous flow.
- More data per year: ~8760 hourly bars vs ~6000 for forex. Training datasets are larger.
- Different distribution: weekend volume is much lower than weekday; weekend price moves are sometimes outsized. Don't normalize weekend bars against weekday stats.
Volatility regimes
Crypto has volatility regimes that don't exist in forex majors. BTC can move 5% in an hour (a 6-sigma event in EURUSD); a stable-coin de-peg event can break any model trained on normal-regime data.
Practical implications:
- Normalize within rolling windows, not over the full history. A 30-day rolling z-score captures the current regime; a full-history z-score smears the recent regime into ancient volatility.
- Train on multiple regime samples. A model trained only on 2024 calm-period data will malfunction in 2025 trend-up data.
- Cap position sizing per-volatility. Static lot sizes are dangerous in crypto. Scale inversely to recent realized vol.
Order book depth as a feature
Crypto exchanges expose level-2 order books over WebSocket. The depth at various price levels — how much resting liquidity there is at 0.1% above and below the mid-price — is a real predictive feature. Forex retail traders don't get this; crypto does.
Adding L2 features to your feature vector:
- Bid/ask volume ratio (top-of-book).
- Depth-imbalance at +/− 0.5%, +/− 1%, +/− 2%.
- Trade flow imbalance over the last N seconds.
These features capture the supply/demand structure that price alone doesn't. Useful additions to any sequence model.
Funding rates as a feature
Perpetual futures (the dominant crypto derivative) charge a funding rate every 8 hours, calculated from the basis between perp and spot. The rate is a noisy proxy for "leveraged sentiment" — high positive funding means longs are paying shorts (bullish sentiment, often crowded), negative means the opposite.
Funding-rate features that work as inputs:
- Current funding rate.
- Rolling 7-day average of funding.
- Funding minus 30-day-mean (deviation from baseline).
Putting it together
A crypto-specific ONNX feature vector might look like: 120 hourly returns + 60 hourly volumes + current bid/ask imbalance + current funding + 7-day funding average. Train as you would forex; export with opset 17; run inference as in the Bybit algo article.
Bybit + an Ubuntu cloud GPU is the most common crypto-bot stack.
Train and run inference on a Linux cloud instance; trade through Bybit:
Affiliate links.