Trading robot · MT5

Gold EA MT5 With OpenAI

by RobertN1D

This Expert Advisor for MetaTrader 5 is specifically designed for XAUUSD trading on the M1 timeframe.

GitHub stars44
Forks19
Last update6 months ago13 Apr 2026
LicenceNone stated

Overview

Gold EA MT5 With OpenAI utilizes a hybrid strategy combining classic technical indicators like RSI, Moving Averages, and ATR with an OpenAI API integration for signal validation. The robot features an on-chart dashboard for telemetry and includes risk controls such as ATR-based stop loss and take profit, a tick-level trailing stop, and maximum position limits. It filters trades based on spread, trading sessions, and support levels while allowing AI to override indicator signals.

Details

Author

RobertN1D on GitHub

Type

Trading robot

Markets

Gold

Timeframes

M1-M5, 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 EA-MT5-OPENAI.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpXLeftint10Left Panel X Position
InpYTopint40Top Panel Y Position
InpWidthLeftint220Left Panel Width
InpWidthRightint280Right Panel Width
InpWidthThirdint280Third Panel Width
InpPanelHeightint600Panel Height
ClrBackgroundcolorC'10,10,12'Background Color
ClrHeadercolorC'255,190,0'Header Color (Gold)
ClrLabelcolorC'180,180,180'Label Color
ClrValuecolorC'255,255,255'Value Color
ClrBuycolorC'46,204,113'Buy/Bullish Color
ClrSellcolorC'231,76,60'Sell/Bearish Color
Show all 39 inputs
NameTypeDefaultDescription
ClrNeutralcolorC'120,120,120'Neutral Color
ClrWarningcolorC'255,152,0'Warning Color
InpRSIPeriodint14RSI Period
InpMAFastint20Fast MA Period
InpMASlowint50Slow MA Period
InpATRPeriodint14ATR Period
InpUseAIbooltrueUse AI for Trading Decisions
InpOpenAIAPIKeystringYOUR OPENAI HEREOpenAI API Key (sk-...)
InpOpenAIModelstringgpt-5-miniOpenAI Model
InpAIUpdateMinutesint1AI Analysis Update (minutes) - MUST BE 1 for swing trading
InpAIConfidenceMindouble0.7Minimum AI Confidence (0.0-1.0)
InpAIOverridebooltrueAllow AI to Override Signals
InpEnableTradingbooltrueEnable Auto Trading
InpLotSizedouble0.01Lot Size per Trade (Swing Trading)
InpRSIBuyLevelint35RSI Level for Buy Signal (oversold)
InpMaxPositionsint10Maximum Open Positions (Swing Trading)
InpStopLossATRdouble2.0Stop Loss (ATR multiplier)
InpMinSpreadPtsint5000Minimum Spread (points) to trade (disabled for crypto)
InpRequireSupportbooltrueRequire Price Near Support Level
InpSupportDistancedouble100.0Support Distance (points)
InpRequireBullishMAbooltrueRequire Bullish MA Trend
InpRequireGoodSessionbooltrueRequire Good Trading Session
InpSwingTradingboolfalseEnable Swing Trading (M15) - DISABLED, using M1
InpProfitTargetATRdouble1.5Take Profit (ATR multiplier)
InpMinProfitPctdouble0.05Minimum Profit % to Close (PROFIT HUNGRY - take any profit!)
InpAIProfitTakingbooltrueLet AI decide when to close
InpTestModeboolfalseEnable Test Mode (Place 0.01 lot, modify SL, then close)

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone RobertN1D/GOLD-EA-MT5-WITH-OPENAI 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

Conquest EA

by MunchonGithub
1 stars

Conquest EA is a self-adjusting expert advisor for MetaTrader 5 that utilizes Smart Money Concepts such as Fair Value Gaps and Break of Structure for entries. It features a built-in learning module that evaluates its own trade outcomes to adjust strategy weighting and confidence in real-time. Risk management includes a

MT5 Trading robot SMC / ICT / price actionAI / machine learningTrend following
Updated 2 months ago Apache-2.0 GitHub repository of Conquest EA

Conquest Platinum SMC EA

by MunchonGithub
1 stars

This MetaTrader 5 expert advisor implements a comprehensive Smart Money Concepts strategy, detecting market structure shifts through Break of Structure and Change of Character events. It monitors Fair Value Gaps and liquidity sweeps to identify entry points across multiple timeframes. The system offers several executio

MT5 Trading robot SMC / ICT / price actionScalpingTrend following
Updated 4 months ago Apache-2.0 GitHub repository of Conquest Platinum SMC EA

SmartScalper Pro AI

by sudesahin0005-bot
1 stars

SmartScalper Pro AI is an automated scalping robot for the MetaTrader 5 platform that utilizes neural network-based decision making alongside pattern recognition. It calculates trade signals using a weighted combination of multiple technical indicators, including RSI, ATR, MACD, Bollinger Bands, Stochastic, and several

MT5 Trading robot AI / machine learningScalpingTrend following
Updated 2 months ago None stated GitHub repository of SmartScalper Pro AI

Gold Sniper Scalper

by Zaibten
1 stars

The Gold Sniper Scalper is an automated trading robot designed for MT5, specifically optimized for scalping gold (XAUUSD). The EA employs technical analysis using indicators like exponential moving averages (EMA), RSI, and ATR for entries, with optional multi-timeframe (MTF) trend confirmation across M5 and M15 charts.

MT5 Trading robot Trend followingScalpingIndicator crossover High risk
Updated 5 weeks ago None stated GitHub repository of Gold Sniper Scalper

XGBoost FX Trading

by ytanaka6174
1 stars

This expert advisor for MetaTrader 4 utilizes a bridge to the R programming environment to implement machine learning for currency trading. It leverages pre-trained XGBoost models to identify trade opportunities based on technical features such as Average True Range, Bears Power, and Bulls Power indicators. The robot m

MT4 Trading robot AI / machine learningScalpingTrend following
Updated 8 years ago None stated GitHub repository of XGBoost FX Trading

EA Scalper XAUUSD

by francomascareloai
266 stars

EA Scalper XAUUSD is an automated trading research project for MetaTrader 5 focused on gold. It employs a multifaceted entry strategy using Smart Money Concepts like order blocks and liquidity sweeps, alongside moving average crossovers and Fibonacci zones. The EA includes a self-learning module designed to adapt to di

MT5 Trading robot SMC / ICT / price actionIndicator crossoverScalping High risk
Updated 4 months ago Custom licence GitHub repository of EA Scalper XAUUSD

More gold EAs

Related on ForexR

Need a Broker for MT5?

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

Compare MT5 brokers