Trading robot ยท MT5

Prem Gold Advisor

by Premkumar238

Prem Gold Advisor is an automated MetaTrader 5 expert advisor specialized for XAUUSD (Gold) trading on the five-minute timeframe.

High risk

GitHub stars1
Forks0
Last update4 weeks ago22 Aug 2026
LicenceNone stated

Overview

Prem Gold Advisor initiates trades using breakout levels placed at specific distances from the candle open. The strategy features a progressive scale-in mechanism, adding new orders as the price hits successive take-profit targets. Risk management includes an initial stop loss, a trailing stop that locks in profit at each level, and spread filters. Users can configure trading hours and maximum concurrent baskets. The repository contains multiple versions but lacks a documentation file.

Details

Author

Premkumar238 on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Breakout, Trend following, Martingale, Grid, Hedging

Markets

Gold

Timeframes

M15-H1

Risk profile

  • Uses martingale lot scaling: losses can grow fast
  • Opens a grid of orders: exposure builds up in a trend
  • Holds opposite positions at once
  • Trades without a fixed stop loss

Input parameters

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

NameTypeDefaultDescription
InpTradeEnabledbooltrueEnable auto trading
InpEnableBuybooltrueEnable Buy baskets
InpEnableSellbooltrueEnable Sell baskets
InpLotSizedouble0.01Lot size per order
InpMagiculong130213Magic number
InpDeviationPointsint50Max slippage / deviation (points)
InpMaxRetriesint3Order send retries
InpCommentstringPGA-V1.3Order comment tag
InpWorkTimeframeENUM_TIMEFRAMESPERIOD_M5Working timeframe (M5)
InpDistanceModeENUM_DIST_MODEDIST_PRICEDistance mode (entry / TP / SL)
InpBuyEntryDistancedouble2.00Buy level = Open + distance
InpSellEntryDistancedouble2.00Sell level = Open - distance
Show all 40 inputs
NameTypeDefaultDescription
InpRequireLeaveFirstboolfalseIf already near level, wait leave then retest
InpAllowBothDirectionsbooltrueAllow both Buy+Sell on same candle
InpTp1double0.50TP1 distance from fill
InpTp2double1.00TP2 distance from fill
InpTp3double1.50TP3 distance from fill
InpTp4double2.00TP4 distance from fill
InpTp5double2.50TP5 distance from fill
InpInitialSldouble5.00Initial SL on first order (0 = NONE โ€” unlimited risk)
InpTrailEnabledbooltrueAfter TPn lock remaining SL at TPn
InpScaleInOnTpbooltrueOpen next order only after previous TP is touched
InpBreakEvenBufferdouble0.10Extra price buffer if interim BE is used
InpBeCompensateSpreadbooltrueCover spread if interim BE is applied
InpCommissionPerLotdouble0.0Round-turn commission per 1.0 lot (account ccy)
InpBreakevenExtraPointsint0Extra points beyond net BE + buffer
InpAllowStackCyclesboolfalseAllow new basket while same side still open
InpMaxActiveBasketsint2Max concurrent baskets (0=off)
InpMaxOpenPositionsint50Hard cap on EA open positions (0=off)
InpMaxSpreaddouble0.80Max spread in price (0=off)
InpStartHourint0Trading start hour (server)
InpEndHourint23Trading end hour (server)
InpCloseOnFridayboolfalseClose all late Friday
InpFridayCloseHourint21Friday close hour (server)
InpShowPanelbooltrueShow on-chart panel
InpPanelXint12Panel X offset
InpPanelYint18Panel Y offset
InpShowLevelsbooltrueDraw entry / TP guide lines
InpApplyChartThemebooltrueDark gold chart theme
InpLogActionsbooltruePrint trail / open actions to Experts log

How to install it

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

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

EA XAUUSD Premium

by diditgravatar
4 stars

This MetaTrader 5 expert advisor is designed for gold trading, utilizing a multi-timeframe strategy across the M15, H1, and H4 charts. It integrates technical indicators including ADX, RSI, and Moving Averages to identify trend-following and breakout opportunities. Risk controls include dynamic lot sizing based on acco

MT5 Trading robot Trend followingBreakoutGrid High risk
Updated 1 year ago None stated GitHub repository of EA XAUUSD Premium

STO Martin

by crq644
2 stars

STO Martin is a grid-based trading robot for MetaTrader 5 that uses technical indicators to manage entries and recoveries. It employs a Stochastic Oscillator for execution signals and a Moving Average to filter trades according to the prevailing trend. The EA features a martingale lot-scaling system that adds positions

MT5 Trading robot MartingaleGridTrend following High risk
Updated 3 years ago None stated GitHub repository of STO Martin

Xauusd Auto Trader

by ibadnarpatih-create
2 stars

This MetaTrader 5 expert advisor is designed for trading XAUUSD using a trend-following approach. It identifies entries through a triple Exponential Moving Average crossover system, requiring ADX momentum confirmation before opening positions. To manage losing trades, the EA employs a martingale strategy that layers or

MT5 Trading robot Trend followingIndicator crossoverMartingale High risk
Updated 3 weeks ago GPL-3.0 GitHub repository of Xauusd Auto Trader
1 stars

This Expert Advisor for MetaTrader 5 focuses on gold trading through a combination of mean-reversion signals and a grid management system. It uses multi-timeframe filters, including exponential moving averages and ADX on the H1 timeframe, to identify trend direction while executing entries on M15 based on RSI and Bolli

MT5 Trading robot Mean reversionGridMartingale High risk

Bakome Bitcoin EA

by BAKOME-Hub
1 stars

Bakome Bitcoin EA is a trend-following robot optimized for trading BTCUSD on the MetaTrader 5 platform. It generates trade signals using an exponential moving average crossover combined with price breakouts on the H1 timeframe. The system features a grid recovery module that adds positions with a lot multiplier when tr

MT5 Trading robot Trend followingBreakoutGrid High risk
Updated 4 months ago MIT GitHub repository of Bakome Bitcoin EA

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