Trading robot · MT5

Xauusd Event Driven

by lightup777777

An event-driven expert advisor for MetaTrader 5 designed specifically for gold.

GitHub stars1
Forks0
Last update4 months ago8 May 2026
LicenceNone stated

Overview

Xauusd Event Driven monitors rapid price movements or stretches to identify entry points, utilizing an exponential moving average for signal smoothing. The strategy focuses on momentum by entering trades after identifying specific price peaks and ignition moves. It incorporates comprehensive risk management, including fixed stop losses, take profits, a news filter for USD events, and a streak-based safety switch to halt trading after consecutive losses. The system includes a timeout feature to automatically exit positions held longer than two minutes.

Details

Author

lightup777777 on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Scalping, Trend following

Markets

Gold

Timeframes

M1-M5

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 XAUUSD_EventDriven_v75_test.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpLotdouble0.10ロット数(0.10=最小単位)
InpDeviationulong30許容スリッページ(points)
InpSilenceWindowSecint3起点判定の参?
InpIgnitionMinMovedouble0.10起点とみなす最小動き?
InpCooldownSecint11サイクル終了後の休止秒数(v75: 3→1 sim最適)
InpUseTimeFilterbooltrue時間帯フィルターON/OFF
InpAvoidStartHourint22取引禁止 開始時刻(サーバー時間)
InpAvoidStartMinint30取引禁止 開始分
InpAvoidEndHourint0取引禁止 終了時刻
InpAvoidEndMinint30取引禁止 終了分
InpReversalMindouble0.10反発と認定する戻り?
InpUseEMASmoothbooltrueEMA平滑化 ON/OFF
Show all 39 inputs
NameTypeDefaultDescription
InpEMAPeriodSecint15EMA期間(秒、振動吸収用)(v75: 5→15 ノイズ強吸収)
InpMinAgeSecint2peak1完成後の最小秒数(v75: 5→2 sim最適)
InpMaxAgeSecint60peak1完成後の最大秒数
InpMinStretchdouble0.20起点→peak1の最小?
InpMaxStretchdouble5.00起点→peak1の最大?
InpTPDistancedouble0.80利確距離(v75test: 0.50→0.80 利大損小)
InpSLBufferdouble0.50損切バッファ(v75test: 0.80→0.50 利大損小)
InpTPFromPeak1booltrueTP基準をpeak1にする ON/OFF
InpUseEarlyTPboolfalse早期利確 ON/OFF(v75test: ON→OFF TP=0.80 を活かすため)
InpEarlyTPMFEdouble0.50MFEがこの値に達したら即決済(v75test: ON時の閾値、現在OFF)
InpTimeoutSecint120保有最大秒数
InpUseMAEEarlyExitboolfalseMAE早期撤退 ON/OFF(v75: ON→OFF sim最適)
InpMAEExitSecint30経過秒数(この秒数経過後に判定)
InpMAEExitThresholddouble-0.50MAE閾値(これより悪化したら撤退)
InpMaxSpreadPointsint100許容最大スプレッド(points)
InpUseTrailingboolfalseトレーリングSL ON/OFF(v75test: ON→OFF 早期確定回避)
InpTrailTriggerdouble0.20含み益$0.20で建値SLに移動(現在OFF)
InpTrailLockdouble0.10含み益$0.40で建値+$0.10にSL(現在OFF)
InpUseStreakStopboolfalse連敗ストップ ON/OFF
InpStreakLossLimitint3連続N回負けで停止
InpStreakStopMinint30停止時間(分)
InpUseNewsFilterbooltrue経済指標フィルター ON/OFF
InpNewsAvoidBeforeMinint5指標発表の何分前から停止
InpNewsAvoidAfterMinint15指標発表の何分後まで停止
InpNewsHighOnlybooltrueHIGH指標のみ対象
InpNewsCurrenciesstringUSD対象通貨
InpWriteCSVbooltrueCSV出力 ON/OFF

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone lightup777777/xauusd-ea-analysis 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

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
42 stars

This Expert Advisor for MetaTrader 5 is specifically designed for XAUUSD trading on the M1 timeframe. It 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 i

MT5 Trading robot ScalpingTrend followingAI / machine learning
Updated 5 months ago None stated GitHub repository of Gold EA MT5 With OpenAI

Scalpflip EA

by anthonycdp
25 stars

Scalpflip EA is an automated scalping robot for MetaTrader 5 that utilizes a multi-layered technical analysis approach. It offers three entry modes: trend-following, mean-reversion, and a smart mode that selects the strategy based on current market conditions. The system filters trades using the Relative Strength Index

MT5 Trading robot ScalpingTrend followingMean reversion
Updated 1 year ago None stated GitHub repository of Scalpflip EA

Prop Firm EA Fleet

by cgemise971
20 stars

Prop Firm EA Fleet is a collection of MetaTrader 5 robots designed for passing prop firm evaluations and managing funded accounts. The suite utilizes various strategies including market structure analysis, session range breakouts for London and New York sessions, and high-frequency scalping. It features strict risk man

MT5 Trading robot SMC / ICT / price actionBreakoutScalping High risk
Updated 9 months ago None stated GitHub repository of Prop Firm EA Fleet

FG Scalping Pro

by FaizGusion00
11 stars

FG Scalping Pro is an automated trading system for MetaTrader 5 that utilizes a multi-indicator approach to identify entry points. It combines exponential moving average crossovers with RSI momentum and Bollinger Band volatility filters to execute trades. The EA manages risk through dynamic ATR-based stop loss and take

MT5 Trading robot ScalpingIndicator crossoverMean reversion
Updated 1 year ago Custom licence GitHub repository of FG Scalping Pro

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