Larry Williams XG Boost ONNX Expert Advisor
Info
The Larry Williams XG Boost ONNX Expert Advisor is a Expert Advisor for MetaTrader 5 that user manual: larry williams ai-filtered eathis expert advisor (ea) integrates the classical larry williams outside bar strategy with an advanced artificial intelligence (onnx) filter. It employs mechanical price action to identify trading setups and leverages AI to predict the likelihood of a successful trade.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Experts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Larry Williams XG Boost ONNX Expert Advisor
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
User Manual: Larry Williams AI-Filtered EAThis Expert Advisor (EA) integrates the classical Larry Williams Outside Bar strategy with an advanced Artificial Intelligence (ONNX) filter.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 5. Place the file in the MQL5/Experts folder and restart the terminal.
Description & Settings
Related: Larry Conners RS I 2 - another powerful expert for MetaTrader 5 traders.
User Manual: Larry Williams AI-Filtered EAThis Expert Advisor (EA) integrates the classical Larry Williams Outside Bar strategy with an advanced Artificial Intelligence (ONNX) filter. It employs mechanical price action to identify trading setups and leverages AI to predict the likelihood of a successful trade.
Also recommended: Bill Williams - similar expert with strong performance on MetaTrader 5.
File Preparation (Essential)
For the EA to function properly, ensure your pre-trained machine learning model is placed in the designated directory:
Filename:
larry_model.onnx (or as specified in the inputs).
Path:
MQL5 > Files > larry_model.onnx
Requirement:
The EA will not initialize (INIT_FAILED) if the file is absent from this folder.
Input Parameters
3. Trading Logic & Strategy
Phase 1: Mechanical Detection
At the start of each new bar, the EA scans for an Outside Bar, where the current candle's High exceeds the previous High, and the Low is lower than the previous Low.
Bullish Signal:
Price closes above the previous bar's High.
Bearish Signal:
Price closes below the previous bar's Low.
Phase 2: AI Validation
Upon detecting an Outside Bar, the EA extracts 10 Data Features (Body size, Relative Range, ATR, Volume change, Day of the week, Hour, etc.) and submits them to the larry_model.onnx model for analysis.
Trade Execution:
The EA enters a BUY position if the AI-predicted probability for Class 1 (Buy) exceeds the InpThreshold. Similarly, it initiates a SELL position if the probability for Class 2 (Sell) surpasses the InpThreshold.
Phase 3: Trade Management
Stop Loss (SL):
Set at the Low (for Buy) or High (for Sell) of the signal candle.
Take Profit (TP):
Automatically calculated based on the InpRR ratio.
Frequency:
The EA maintains a disciplined approach, allowing only one open position at a time.
Technical Requirements for the ONNX Model
When training the model in Python (Scikit-Learn, PyTorch, etc.), ensure the output aligns with the EA's requirements:
Output Node 0:
Predicted Label (Long).
Output Node 1:
Probabilities (Float array of 3 classes: [Neutral, Buy, Sell]).
Feature Order:
The data must be arranged in the precise order defined in the CalculateFeatures function (Body Size, Rel Range, Bull/Bear flag, ATR, Rel ATR, Day, Hour, Vol Change, Prev Direction).
Deployment and Self-Training
unzip larry_william.zip
run command pip install -r requirements.txt
open MetaTrader 5
run python download_csv_metatrader5.py
run python train_larry_williams.py
run python convert_onnx_larry.py
You may also like: williams percent direction index - excellent alternative for expert users on MetaTrader 5.
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.