Larry Williams ONNX
This EA uses an ONNX (Open Neural Network Exchange) machine learning model to implement a Larry Williams-style trading strategy. It feeds market data into a pre-trained neural network model to generate buy/sell signals, combining Larry Williams' proven trading principles with modern deep learning inference for automated trade execution.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
Why this EA never traded: no entry rule survived the conversion.
Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.
Blow-up risk: No blow-up pattern found
None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.
High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →
Strategy analysis
The core strategy of this EA integrates Larry Williams' classic trading principles (such as %R oscillator, volatility breakout, and price momentum) through an ONNX machine learning model for fusion and optimization. Entry conditions depend on the ONNX model's inference output, where the model receives multi-dimensional market features (such as price series, technical indicator values) as input and generates trading direction signals after neural network computation. Exit conditions may combine the model's reverse signals or traditional stop-loss and take-profit mechanisms. For position sizing, the EA may place orders based on the model's output confidence level or fixed lot sizes. Money management likely employs a fixed percentage or risk-per-trade approach. The overall strategy combines traditional technical analysis with data-driven machine learning prediction, aiming to capture non-linear market patterns.
Strengths
- Uses ONNX machine learning model to capture non-linear market patterns beyond the limitations of traditional linear indicators
- Based on Larry Williams' well-established trading principles, providing a solid practical foundation for strategy logic
- ONNX format offers excellent cross-platform compatibility, allowing models trained in various frameworks to be deployed
- Deep learning model can fuse numerous market features for comprehensive multi-dimensional signal generation
Weaknesses
- ONNX model files are essentially black boxes, making it impossible to directly audit internal decision logic and weights
- Machine learning models carry overfitting risk, where excellent backtesting performance may significantly degrade in live trading
- Models require periodic retraining to adapt to changing market conditions, resulting in higher maintenance costs
- Lacks model performance monitoring mechanisms to assess whether predictions remain valid in real-time
Possible improvements
- Add model prediction confidence filtering to pause trading during low confidence periods and reduce false signals
- Implement online learning or adaptive modules so the model can dynamically adjust based on recent market performance
- Add multi-timeframe confirmation mechanism to reduce misjudgments caused by single timeframe noise
Risk assessment
Overall risk: Medium
- ONNX model is a black box, making it impossible to predict behavior during extreme market conditions
- Model may continuously generate incorrect signals during market regime changes until manually intervened
- Lacks robustness handling for model inference failures or anomalous outputs
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
ModelPath | larry_williams_model.onnx | ONNX model file path |
LotSize | 0.1 | Lot size for margin calculation |
StopLoss | 500 | Stop loss in points |
TakeProfit | 1000 | Take profit per order (points) |
MagicNumber | 68424 | EA magic number for distinguishing orders |
Similar Machine Learning EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.