This MetaTrader 5 expert advisor utilizes a Naive Bayes probabilistic model integrated with Smart Money Concepts and ICT principles to identify trading opportunities.
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.
Read from NaiveBayes_GoldBiasPullback_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
LookbackCandles
int
500
Training history depth (bars)
Lookahead
int
5
Predict N bars ahead
RetrainEveryBars
int
1
Re-train every N new bars (1=each bar)
HighProbThreshold
double
65.0
Prob% for instant entry
MedProbThreshold
double
45.0
Prob% to arm PREPARING state
RiskPercent
double
2.0
Risk per trade as % of balance
ATR_SL_Mult
double
1.5
SL = ATR × this multiplier
RR_Ratio
double
1.8
TP = SL × RR ratio
MaxLotSize
double
0.50
Hard lot cap
MaxSpreadPips
double
3.0
Block entry above this spread
ATR_VolatilityGate
double
3.0
Min ATR pips to allow trade (filters dead markets)
AsianStartHour
int
0
Show all 40 inputs
Name
Type
Default
Description
AsianEndHour
int
8
LondonStartHour
int
8
LondonEndHour
int
16
NewYorkStartHour
int
13
NewYorkEndHour
int
21
UseOB
bool
true
Order Blocks
UseFVG
bool
true
Fair Value Gaps
UseBOSCHoCH
bool
true
BOS / CHoCH structure
UseLiquiditySweep
bool
true
Liquidity sweep detection
UseCRT
bool
true
Candle Range Theory
UseSessionAMD
bool
true
Session highs/lows (AMD)
UseH4Bias
bool
true
H4/D1 macro trend bias
UseFibLevels
bool
true
Fibonacci retracement levels
UseMurrayLevels
bool
true
Murray Math channel levels
UsePsychLevels
bool
true
Gold psychological levels
UsePivots
bool
true
Daily/Weekly pivots
OBScanBars
int
60
H1 bars to scan for OBs
OBMinBodyPips
double
8.0
Min OB candle body (pips)
FVGMinGapPips
double
5.0
Min gap size (pips) — smaller for M15
FVGExpiryHours
int
48
Hours before FVG expires
HA_WickTolerancePct
double
0.10
Wick tolerance as % of ATR (for metals)
MaxDailyTrades
int
8
Max trades per day (0=unlimited)
MaxDailyLossUSD
double
10.0
Stop trading after daily loss exceeds (0=off)
BiasBaseLot
double
0.01
Normalize gold move value to this lot size
BiasConfirmUSD
double
30.0
Direction is confirmed after this move from day open
BiasOpenRetestUSD
double
2.0
Near day open after confirmation = danger zone
PullbackSafeMinUSD
double
20.0
Safer pullback lower band
PullbackSafeMaxUSD
double
30.0
Safer pullback upper band
How to Install It
1Download the sourceUse "Download source (.zip)" above, or clone andeleabraham/NaiveBayes_EA from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
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.
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
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
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
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
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
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