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 stars42
Forks18
Last update5 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

Platform

MetaTrader 5 (MQL5)

Strategy

Scalping, Trend following, AI / machine learning

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 4 weeks 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 3 months ago Apache-2.0 GitHub repository of Conquest Platinum SMC EA

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
236 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 3 months ago Custom licence GitHub repository of EA Scalper XAUUSD

Nyao Scalper

by elrizwiraswara
173 stars

Nyao Scalper is an automated scalping robot for MetaTrader 5 that utilizes a multi-factor weighted scoring system to identify trade opportunities. It evaluates trend alignment through EMA crossovers, momentum via RSI, and price action through wick rejection and candle body analysis. The EA manages risk with adaptive AT

MT5 Trading robot ScalpingTrend followingMartingale High risk
Updated 3 months ago BSD-3-Clause GitHub repository of Nyao Scalper

FxChartAI OpenEA

by abiodunaremu
49 stars

FxChartAI OpenEA is an automated trading solution for MetaTrader 5 that executes trades based on signals retrieved from the FxChartAI platform. The system operates in two modes, allowing for live API integration or historical testing using CSV datasets. It utilizes multi-timeframe analysis across M10 and H1 intervals,

MT5 Trading robot AI / machine learningTrend following
Updated 1 year ago GPL-3.0 GitHub repository of FxChartAI OpenEA

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