On each closed signal bar, default M15, it enters when price sweeps the extreme of a lookback window and closes back inside, optionally requiring a reversal candle. A higher-timeframe fast and slow EMA filter can restrict direction. Stop loss is placed beyond the sweep extreme by an ATR multiple, bounded by point limits, and take profit uses a reward-to-risk ratio. Position size is a risk percent of equity or balance, or a fixed lot. Daily loss, drawdown, open risk, and free-margin checks can halt new trades or close positions. Live trading is off by default, and dry-run mode only logs orders.
Read from GoldSweepEA.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpMagic
long
20261022
Magic number (unique per chart/symbol)
InpEnableTrading
bool
true
Master switch: allow new entries
InpDryRun
bool
false
Dry run: log orders, do not send
InpEnableLiveTrading
bool
false
Allow trading on REAL accounts
InpPersistState
bool
true
Persist state in MQL5/Files
InpResetState
bool
false
Ignore saved state at start (fresh test)
InpLogLevel
int
2
Log level: 0 errors, 1 warn, 2 info, 3 debug
InpAlerts
bool
false
Popup alerts on errors/entries (live only)
InpShowDashboard
bool
true
Show on-chart dashboard
InpWriteTradeLog
bool
true
Append trade events to CSV in MQL5/Files
InpSignalTF
ENUM_TIMEFRAMES
PERIOD_M15
Signal timeframe (closed bars only)
InpSweepLookback
int
16
Lookback bars for the sweep level (>= 3)
Show all 40 inputs
Name
Type
Default
Description
InpMinPenetrationATR
double
0.10
Min penetration beyond level (x ATR)
InpReclaimBufferATR
double
0.00
Close back inside by this buffer (x ATR)
InpRequireReversalClose
bool
true
Require reversal candle (close vs open)
InpMaxBarRangeATR
double
3.00
Skip if signal bar range > x ATR (0 = off)
InpAtrPeriod
int
14
ATR period
InpUseTrendFilter
bool
true
Enable higher-timeframe EMA filter
InpTrendTF
ENUM_TIMEFRAMES
PERIOD_H1
Trend timeframe
InpEmaFastPeriod
int
50
Fast EMA period
InpEmaSlowPeriod
int
200
Slow EMA period
InpTrendRequirePrice
bool
false
Require trend-TF close beyond slow EMA
InpAtrSLMult
double
1.00
ATR multiple beyond sweep extreme for SL
InpMinSLPoints
int
120
Minimum SL distance (points)
InpMaxSLPoints
int
900
Maximum SL distance (points, 0 = off)
InpRR
double
2.00
Reward:Risk for TP (0 = no TP)
InpRiskBufferPct
double
10.0
Inflate risk estimate for costs (%)
InpCommissionPerLotRT
double
0.00
Commission per 1.0 lot round turn (account ccy)
InpRiskMode
ENUM_GS_RISK_MODE
GS_RISK_PERCENT
Position sizing mode
InpRiskPercent
double
0.50
Risk per trade (% of equity/balance)
InpFixedLot
double
0.01
Fixed lot (fixed mode only)
InpUseEquityForRisk
bool
true
Use equity (true) or balance (false)
InpMaxRiskMult
double
1.00
Max actual/planned risk multiplier (min-lot override)
InpMaxDailyLossPct
double
3.00
Daily loss hard stop (% of day-start balance, 0 = off)
InpDailyLossClosePos
bool
true
Close positions when daily limit is hit
InpMaxDrawdownPct
double
10.0
Max drawdown from equity high-water mark (%, 0 = off)
InpMaxDDClosePos
bool
true
Close positions when max drawdown is hit
InpMaxOpenRiskPct
double
2.00
Max total open risk (% of equity, 0 = off)
InpMinFreeMarginPct
double
30.0
Min free margin after entry (% of equity)
InpLossScope
ENUM_GS_LOSS_SCOPE
GS_SCOPE_EA
Daily loss scope
How to Install It
1Download the sourceUse "Download source (.zip)" above, or clone sepehrkafaeinezhad-hue/arena-ai-projects 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.
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
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
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
Fvg Gold EA is an automated trading robot for MetaTrader 5 designed specifically for the gold market. It utilizes institutional trading concepts by identifying high-probability Fair Value Gaps with Order Block confluence. The system employs a scoring algorithm to evaluate trade quality based on displacement, gap size,
This automated trading system for MetaTrader 5 focuses on spot Gold using Inner Circle Trader methodology. It identifies entries through order block detection, market structure analysis, and weekly opening price levels. The strategy is further filtered by dual moving averages and specific trading sessions, primarily Lo
MT5Trading robotSMC / ICT / price actionIndicator crossoverTrend following