Larry Williams XG Boost Onnx
This tool for MetaTrader 5 is specifically engineered to streamline your trading operations. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.
How to Setup and Use Larry Williams XG Boost Onnx
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.
Description & Settings
This Expert Advisor (EA) combines the classical
Larry Williams Outside Bar
strategy with an
Artificial Intelligence (ONNX)
filter. It uses mechanical price action to find setups and AI to predict the probability of a successful trade.
1. File Preparation (Crucial)
For the EA to initialize correctly, you must place your pre-trained machine learning model in the correct directory:
Filename:
larry_model.onnx (or the name specified in the inputs).
Path:
MQL5 > Files > larry_model.onnx
Requirement:
The EA will fail to start ( INIT_FAILED ) if the file is missing from this folder.
2. Input Parameters 3. Trading Logic & Strategy
Phase 1: Mechanical Detection
At the opening of every new bar, the EA checks for an
Outside Bar
(the current candle's High is higher than the previous, and the Low is lower than the previous).
Bullish Signal:
Price closes above the previous bar's High.
Bearish Signal:
Price closes below the previous bar's Low.
Phase 2: AI Validation
If an Outside Bar is detected, the EA extracts
10 Data Features
(Body size, Relative Range, ATR, Volume change, Day of the week, Hour, etc.) and sends them to the larry_model.onnx model.
The EA executes a
BUY
if the AI probability for Class 1 (Buy) > InpThreshold .
The EA executes a
SELL
if the AI probability for Class 2 (Sell) > InpThreshold .
Phase 3: Trade Management
Stop Loss (SL):
Placed at the Low (for Buy) or High (for Sell) of the signal candle.
Take Profit (TP):
Calculated automatically based on the InpRR ratio.
Frequency:
The EA only allows
one open position at a time
.
4. Technical Requirements for the ONNX Model
If you are training the model in Python (Scikit-Learn, PyTorch, etc.), ensure the output matches the EA 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 fed in the exact order defined in the CalculateFeatures function (Body Size, Rel Range, Bull/Bear flag, ATR, Rel ATR, Day, Hour, Vol Change, Prev Direction).
5. How to Deploy & Training self
unzip larry_william.zip
run command pip install -r requirements.txt
open metatrader 5 first
run python download_csv_metatrader5.py
run python train_larry_williams.py
run python convert_onnx_larry.py