Trading robot · MT5

Algorithmic Gambling EA

by phumlani-mbabela

This MetaTrader 5 expert advisor is designed for EURUSD trading using moving average crossovers and candlestick pattern detection.

GitHub stars1
Forks1
Last update1 year ago15 Jun 2025
LicenceNone stated

Overview

Algorithmic Gambling EA features a scalping mode and dynamic stop loss and take profit calculations that can optionally account for market volatility. Risk is controlled through fixed USD profit and loss targets, trailing stops, and a limit on the number of open trades per session. The repository includes multiple versions ranging from simplified to aggressive configurations, alongside a basic news filter.

Details

Author

phumlani-mbabela on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Indicator crossover, Scalping

Markets

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.

Input parameters

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

NameTypeDefaultDescription
UseEAInAutoModebooltrueUse EA in Active Mode.
BarsToWaitPriorTradingint10Number of bars to wait before trading
InpFastPeriodint4Fast period.
InpSlowPeriodint7Slow period.
InpLotSizedouble0.33Lot size.
InpTakeProfitUSDint10.0Take Profit in USD.
InpStopLossUSDint10.0Stop Loss in USD.
InpStopLossAdjustmentdouble0.00001Stop Loss Adjustment.
InpTakeProfitAdjustmentdouble0.00001Take Profit Adjustment.
InpMagicNumberulong820607Magic Number.
CalculateDynamicTP_SLbooltrueCalculate Dynamic TP SL
CalculateDynamicTP_SL_Stepsdouble0.1Calculate Dynamic TP SL Steps
Show all 40 inputs
NameTypeDefaultDescription
FactorVolatilityIn_TP_SL_CalculationboolfalseFactor Volatility In TP/SL Calculations
MaxOpenTradesPerSessionint1Max open trades per session.
CrossOverFastSlowDistanceTollerancedouble0.00010Crossover Fast vs Slow Distance Tollerance
FastSlowDistanceTollerancedouble0.00015Fast vs Slow Distance Tollerance
CloseWhenProfitGreaterThandouble10.0Close When Profit Greater Than
CloseWhenLossGreaterThandouble-10.0Close When Loss Greater Than
InpRequestDeviationInPointsulong10.0InpRequest Deviation In Points
SESSION_PERIOD_RESOLUTIONENUM_TIMEFRAMESPERIOD_M1Session Period
BEBUG_BOTbooltrueBEBUG_BOT mode
fastThresholddouble0.00110Fast Threshold speed classification
slowThresholddouble0.00011Slow Threshold speed classification
EnableSpeedThresholdbooltrueEnable Speed Threshold
CrossoverPredictionCandlesint1Crossover prediction candles.
BullBearRunCandleDepthint3BullBearRunCandleDepth
BullRunCandleCountint2BullRunCandleCount
BearRunCandleCountint2BearRunCandleCount
IgnoreDetectMAConvergencebooltrueIgnoreDetectMAConvergence
IgnoreDetectMAConvergenceTollerrancedouble0.000100IgnoreDetectMAConvergenceTollerrance
EnableScalpingModebooltrueEnableScalpingMode
IgnoreCandleStickPremonitionboolfalseIgnoreCandleStickPremonition
StickEntryCutoffPipsizedouble4.0StickEntryCutoffPipsize
GoodBadTradesInThePastNCandlesticksint1GoodBadTradesInThePastNCandlesticks
InpCrossReferenceTimePeriodstringM1,M5,M15,M30,H1,H4,D1,W1,MNInpCrossReferenceTimePeriod "M1,M5,M15,M30,H1,H4,D1,W1,MN"
HoursAheadint24
MinutesBeforeAlertint5
NewsCurrencystringUSDFilter e.g. "USD", "EUR"
HighImpactOnlybooltrue
AutoRefreshInterval_Minutesint10

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone phumlani-mbabela/AlgorithmicGambling 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, and any .mqh files into the Include folder the code expects.
  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

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

Trillex 10S EA

by NadirAliOfficial
24 stars

Trillex 10S is a MetaTrader 5 scalping expert advisor optimized for Gold (XAUUSD). It executes trades based on the alignment of a three-period Exponential Moving Average (EMA) stack and Parabolic SAR indicators. The system features a proprietary synthetic bar engine that processes price data into 5-second and 10-second

MT5 Trading robot ScalpingIndicator crossover

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

Gold Scalper MT5

by autoea-online
5 stars

Gold Scalper is an educational MetaTrader 5 expert advisor designed for scalping XAUUSD on the one-minute timeframe. It is presented as a masterclass tutorial to demonstrate modular coding practices. The system utilizes a 200-period Exponential Moving Average for trend filtering and the Relative Strength Index for entr

MT5 Trading robot ScalpingTrend followingIndicator crossover
Updated 6 months ago MIT GitHub repository of Gold Scalper MT5
4 stars

Gold SnR Momentum Scalper Pro is an automated scalping robot for MetaTrader 5, specifically optimized for XAUUSD on the M1 timeframe. It identifies entry points by combining support and resistance zones with RSI and moving average momentum. The system incorporates tick-level analysis to measure buying and selling press

MT5 Trading robot ScalpingBreakoutMean reversion
Updated 3 months ago Custom licence GitHub repository of Gold SnR Momentum Scalper 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