거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
Experts

Larry Williams XGBoost Onnx - MetaTrader 5용 expert

조회수:
835
평가:
(2)
게시됨:
\MQL5\Files\
larry_model.onnx (4120.09 KB)
larry_william.zip (5.12 KB)
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

XAUUSD TimeFrame H4


📋 User Manual: Larry Williams AI-Filtered EA

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

Parameter Description
InpMagic Unique ID for the EA to manage its own trades without interfering with others.
InpLotSize The volume of the position to be opened (e.g., 0.5 lots).
InpRR Risk/Reward Ratio. If set to 1.5, the Take Profit will be 1.5x the distance of the Stop Loss.
InpModelName The exact name of your ONNX file in the Files folder.
InpThreshold AI Confidence level (0.0 to 1.0). The EA will only trade if the AI probability is higher than this value (e.g., 0.6 = 60%).
InpAtrPeriod Period for the Average True Range (ATR) used as one of the AI data features.


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:

  1. Input Shape: {1, 10} (10 features).

  2. Output Node 0: Predicted Label (Long).

  3. Output Node 1: Probabilities (Float array of 3 classes: [Neutral, Buy, Sell]).

  4. 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

  1. unzip larry_william.zip

  2. run command pip install -r requirements.txt

  3. open metatrader 5 first

  4. run python download_csv_metatrader5.py

  5. run python train_larry_williams.py

  6. run python convert_onnx_larry.py


iCrosshair - Real-Time Candle Metrics on Hover iCrosshair - Real-Time Candle Metrics on Hover

Hover over any candle to see what MT5 doesn't show: Range size, Body percentage, Wick ratios. Smart, fast, and customizable.

Price Action Dynamic Exit Strategy - Profit Shield pro Price Action Dynamic Exit Strategy - Profit Shield pro

Take it as profit guardian or market reversal detector. It is a script that acts as a safety net to protect profits when you're away. Instead of just waiting for a fixed Take Profit level, it monitors price behaviour and closes the trade if it shows signs of reversing before hitting your Take Profit.

Log Log

Multi-Mode Logarithmic Transform Indicator.

RiskSizer Panel Lite MT5 - Risk Percent Lot Calculator With One Click Buy Sell RiskSizer Panel Lite MT5 - Risk Percent Lot Calculator With One Click Buy Sell

RiskSizer Panel Lite is a simple MT5 trading panel that calculates an estimated lot size based on your risk percent. Drag two chart lines to set SL/TP, then use one-click BUY/SELL for fast manual execution.