Trading robot · MT5

ScalperBot

by MassimilianoMazzeo

ScalperBot is a multi-strategy Expert Advisor for MetaTrader 5, designed primarily for XAUUSD and cryptocurrency trading.

GitHub stars1
Forks0
Last update2 months ago23 Sep 2026
LicenceNone stated

Overview

ScalperBot executes four distinct trading strategies across independent timeframes: box mean-reversion, candle momentum, channel breakouts, and trend pullbacks. Entries are filtered by higher-timeframe trend directional filters and relative ATR spread limits. Trades utilize ATR-calculated stop loss distances and manage risk in R-multiples, offering partial profit taking at initial targets and trailing stops for secondary runner positions. Risk parameters include risk-based lot sizing, maximum daily loss caps, target profit limits, and consecutive loss trade pauses.

Details

Author

MassimilianoMazzeo on GitHub

Type

Trading robot

Markets

Gold, Crypto, Forex

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.

EA Files

Input Parameters

Read from ScalperBot.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpLotModeENUM_LOT_MODELOT_RISK_PCTCome si calcola il lotto
InpRiskPctdouble3.0Rischio per trade in % del capitale (modo LOT_RISK_PCT)
InpLotSizedouble0.25Lotto fisso (modi LOT_FIT_RISK / LOT_FIXED_SKIP) e lotto massimo in LOT_RISK_PCT
InpMagicBaseulong998870Magic number base (ogni strategia usa base+indice)
InpMaxPositionsint3Posizioni aperte massime (tutte le strategie)
InpMaxSpreadPctRdouble25.0Spread massimo in % dello Stop Loss (R) della strategia
InpMaxSpreadint0Spread massimo assoluto (Punti), 0 = off (vale solo quello in % di R)
InpSlippageint20Slippage minimo (Punti): si usa il maggiore tra questo e il 10% di R
InpStatusEveryMinint5Ogni quanti minuti scrivere lo stato nel journal (0 = solo sul grafico)
InpSlModeENUM_SL_MODESL_ATRCome si calcola lo Stop Loss
InpMaxLossMoneydouble18.0Perdita massima per posizione (€): tetto o SL fisso. 0 = solo la % qui sotto
InpMaxLossPctdouble6.0Perdita massima per posizione in % del capitale (0 = off): vale il piu' basso tra questa e il tetto in euro
Show all 40 inputs
NameTypeDefaultDescription
InpMaxLossRMultdouble1.3Chiusura d'emergenza a X volte il rischio previsto (0 = off): lo SL che non scatta non costa piu' di cosi'
InpBeRdouble0.5A +X R porta lo SL a Break-Even
InpBeBufferPointsint5Buffer minimo oltre l'apertura per il Break-Even (le commissioni reali si aggiungono da sole)
InpTp1Rdouble1.0A +X R chiude lo scalp (parziale se runner, totale altrimenti)
InpScalpPctdouble50.0% di posizione chiusa allo scalp (se runner attivo)
InpLockRdouble0.5Dopo lo scalp, SL a +X R
InpTp2Rdouble3.0Target finale del runner (R)
InpTrailAtrMultdouble1.5Trailing del runner: estremo dall'ingresso - ATR x X
InpTrailStepPctRdouble10.0Trailing: sposta lo SL solo se migliora di almeno X% di R
InpCommissionPerSidebooltrueCommissione addebitata sia in entrata che in uscita
InpMaxDailyLossdouble75.0Perdita massima giornaliera (€), 0 = off
InpMaxDailyLossPctdouble8.0Perdita massima giornaliera in % del saldo di inizio giornata (0 = off): vale la piu' bassa tra le due
InpDailyTargetdouble150.0Obiettivo giornaliero (€): raggiunto, niente nuovi ingressi; 0 = off
InpDailyTargetPctdouble12.0Obiettivo giornaliero in % del saldo di inizio giornata (0 = off): vale il piu' basso tra i due
InpMaxConsecLossesint3Perdite consecutive prima della pausa, 0 = off
InpPauseMinutesint60Durata pausa dopo le perdite consecutive
InpMinSecBetweenTradesint30Attesa minima tra due ingressi (secondi)
InpStartHourint4Ora server inizio operatività (0-23): 4 = niente ingressi di notte (00-03 italiane)
InpEndHourint22Ora server fine operatività (1-24); 0-24 = sempre. 4-22 = 03:00-21:00 italiane
InpAdxPeriodint14
InpAdxRangeMaxdouble20.0RNG solo se ADX < X (mercato laterale)
InpAdxTrendMindouble22.0MOM e PB solo se ADX >= X (mercato direzionale)
InpAtrPeriodint14
InpTrendFilterbooltrueOpera solo nel verso del trend del timeframe alto
InpTrendTfENUM_TIMEFRAMESPERIOD_H1Timeframe del trend
InpTrendEmaint50Periodo della EMA di trend
InpTrendNeedSlopebooltrueServe anche la EMA inclinata nel verso (no = basta prezzo sopra/sotto)
InpTrendInvertbooltrueControtrend: opera solo CONTRO il verso del timeframe alto

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone MassimilianoMazzeo/ScalperBot 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

UltraHFT Expert Advisor

by NipunDilshanSenevirathne
1 stars

UltraHFT Expert Advisor is a high-frequency scalping robot for MetaTrader 5 that combines five strategy layers including EMA crossovers, RSI mean reversion, and volatility breakouts. It evaluates market conditions on every tick, entering trades when multiple signals align. The system employs strict risk controls with h

MT5 Trading robot ScalpingMean reversionTrend following High risk

Phoenix EA

by softwareengdev
1 stars

Phoenix EA is an autonomous multi-strategy trading robot developed for MetaTrader 5. It combines four distinct trading approaches—trend following, mean reversion, breakout, and scalping—using a weighted signal aggregator and dynamic market regime detection. Position sizing is calculated using the Kelly Criterion alongs

MT5 Trading robot Trend followingMean reversionBreakout
Updated 7 months ago None stated GitHub repository of Phoenix EA

Baby MT4 EA

by dolie
2 stars

This MetaTrader 4 expert advisor utilizes the SuperTrend and Bollinger Bands indicators to identify market entries. It monitors for trend changes, breakouts, corrections, and pullbacks. The EA incorporates several risk management tools, including a configurable stop loss, dynamic stop loss logic, and a trailing stop. I

MT4 Trading robot Trend followingBreakoutScalping High risk
Updated 9 years ago None stated GitHub repository of Baby MT4 EA

Nyao Scalper

by elrizwiraswara
214 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 4 weeks ago BSD-3-Clause GitHub repository of Nyao Scalper

Scalpflip EA

by anthonycdp
27 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
26 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 11 months ago None stated GitHub repository of Prop Firm EA Fleet

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