Trading robot · MT5

Naive Bayes Gold Bias Pullback

by andeleabraham

This MetaTrader 5 expert advisor utilizes a Naive Bayes probabilistic model integrated with Smart Money Concepts and ICT principles to identify trading opportunities.

GitHub stars1
Forks0
Last update6 weeks ago12 Aug 2026
LicenceNone stated

Overview

Naive Bayes Gold Bias Pullback primarily targets gold bias and pullbacks but includes logic for universal symbol support. The system uses a machine learning engine that self-retrains on every new bar to predict future price direction. Trade execution depends on detected features like Order Blocks, Fair Value Gaps, and Liquidity Sweeps. Risk management is handled through ATR-adaptive stop losses, daily loss limits, and a volatility gate. The robot also incorporates session-based filters and Murray Math levels.

Details

Author

andeleabraham on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

AI / machine learning, SMC / ICT / price action, Multi-strategy

Markets

Gold, Forex

Timeframes

M15-H1

Risk Profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input Parameters

Read from NaiveBayes_GoldBiasPullback_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
LookbackCandlesint500Training history depth (bars)
Lookaheadint5Predict N bars ahead
RetrainEveryBarsint1Re-train every N new bars (1=each bar)
HighProbThresholddouble65.0Prob% for instant entry
MedProbThresholddouble45.0Prob% to arm PREPARING state
RiskPercentdouble2.0Risk per trade as % of balance
ATR_SL_Multdouble1.5SL = ATR × this multiplier
RR_Ratiodouble1.8TP = SL × RR ratio
MaxLotSizedouble0.50Hard lot cap
MaxSpreadPipsdouble3.0Block entry above this spread
ATR_VolatilityGatedouble3.0Min ATR pips to allow trade (filters dead markets)
AsianStartHourint0
Show all 40 inputs
NameTypeDefaultDescription
AsianEndHourint8
LondonStartHourint8
LondonEndHourint16
NewYorkStartHourint13
NewYorkEndHourint21
UseOBbooltrueOrder Blocks
UseFVGbooltrueFair Value Gaps
UseBOSCHoCHbooltrueBOS / CHoCH structure
UseLiquiditySweepbooltrueLiquidity sweep detection
UseCRTbooltrueCandle Range Theory
UseSessionAMDbooltrueSession highs/lows (AMD)
UseH4BiasbooltrueH4/D1 macro trend bias
UseFibLevelsbooltrueFibonacci retracement levels
UseMurrayLevelsbooltrueMurray Math channel levels
UsePsychLevelsbooltrueGold psychological levels
UsePivotsbooltrueDaily/Weekly pivots
OBScanBarsint60H1 bars to scan for OBs
OBMinBodyPipsdouble8.0Min OB candle body (pips)
FVGMinGapPipsdouble5.0Min gap size (pips) — smaller for M15
FVGExpiryHoursint48Hours before FVG expires
HA_WickTolerancePctdouble0.10Wick tolerance as % of ATR (for metals)
MaxDailyTradesint8Max trades per day (0=unlimited)
MaxDailyLossUSDdouble10.0Stop trading after daily loss exceeds (0=off)
BiasBaseLotdouble0.01Normalize gold move value to this lot size
BiasConfirmUSDdouble30.0Direction is confirmed after this move from day open
BiasOpenRetestUSDdouble2.0Near day open after confirmation = danger zone
PullbackSafeMinUSDdouble20.0Safer pullback lower band
PullbackSafeMaxUSDdouble30.0Safer pullback upper band

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone andeleabraham/NaiveBayes_EA from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar Expert Advisors

My Trading Bot

by carlosrod723
78 stars

This MetaTrader 5 expert advisor implements a multi-strategy framework based on Smart Money Concepts. It identifies fractal-based liquidity sweeps, order blocks, and Fibonacci zones across multiple timeframes, typically using H4 for trend direction and M15 for execution. The EA includes an optional machine learning fil

MT5 Trading robot SMC / ICT / price actionAI / machine learningMulti-strategy
Updated 10 months ago MIT GitHub repository of My Trading Bot

Quantum Alpha MT5 ONNX

by yole-shop-oficial
1 stars

This expert advisor for MetaTrader 5 combines traditional quantitative strategies with machine learning via the ONNX runtime. It features multiple trading modes including Order Blocks, market structure analysis, and a hybrid AI strategy using neural network predictions trained in PyTorch. The system incorporates compre

MT5 Trading robot SMC / ICT / price actionAI / machine learningTrend following High risk
Updated 5 weeks ago None stated GitHub repository of Quantum Alpha MT5 ONNX

RapidPass EA

by jonahgrigoryan
1 stars

RapidPass EA (RPEA) is an MT5 trading robot designed specifically for passing prop firm challenges. It utilizes a hybrid ensemble architecture combining Burst-Weighted Imbalance with Session Confluence (BWISC) and mean-reversion strategies. The EA incorporates machine learning through Q-learning and contextual bandits

MT5 Trading robot SMC / ICT / price actionMean reversionAI / machine learning High risk
Updated 6 months ago None stated GitHub repository of RapidPass EA

Gold Trader EA

by mehdi-jahani
141 stars

Gold Trader EA is a multi-strategy expert advisor designed for trading XAUUSD on the MetaTrader 5 platform. It employs a fusion engine that combines up to 14 different technical analysis methods, including candlestick patterns, chart patterns, price action, and institutional levels. The system requires a user-defined n

MT5 Trading robot Multi-strategyTrend followingIndicator crossover
Updated 1 year ago None stated GitHub repository of Gold Trader EA
84 stars

This MetaTrader 5 expert advisor implements Smart Money Concepts including Order Blocks, Fair Value Gaps, and Break of Structure entries. It features an automated mode that combines multiple strategies alongside market regime detection using ADX or Efficiency Ratio to ensure trading in trending conditions. Risk managem

MT5 Trading robot SMC / ICT / price actionTrend followingMulti-strategy
Updated 2 months ago Apache-2.0 GitHub repository of SMC Unified Expert Advisor

Makets GA

by nopaixx
20 stars

Makets GA is a neural network trading system for MetaTrader 5 that utilizes genetic algorithms to optimize weights for multi-layer perceptrons. Instead of standard price prediction, the EA evolves trading strategies by processing price data across several major currency pairs simultaneously. It implements evolutionary

MT5 Trading robot AI / machine learningMulti-strategy
Updated 8 years ago None stated GitHub repository of Makets GA

More trading robots

Need a Broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers