UT Gold Bot M15
- Эксперты
- Версия: 1.0
Gold trading robot for MT5. Trades XAUUSD on M15 with an ATR trailing stop,
stop and reverse, no martingale, no grid, no averaging. Settings validated by
grid search on 20,006 real gold bars, with a 100% real tick backtest included
and reproducible with the set file provided.
VERIFIED BACKTEST, 100% REAL TICKS
MetaTrader 5 Strategy Tester, XAUUSD M15, 2026.01.01 to 2026.08.14,
63,869,624 real ticks, 10,000 USD deposit, fixed 0.01 lot, real broker spread:
Net profit +2,409.41 USD
Profit factor 1.82
Expected payoff +16.06 USD per trade
Sharpe ratio 3.16
Recovery factor 3.02
Trades 150
Won 47.33%
Balance drawdown 641.00 USD, 5.35%
Equity drawdown 797.66 USD, 6.58%
Largest loss -137.65 USD
Max consecutive loss 5 trades, -159.61 USD
Over that period gold itself moved only +23.86 USD net, and the 150 trades
split evenly: 75 long, 75 short, with profit close to even between the two
sides. The result is not disguised directional exposure.
WHAT IT IS
A gold trend following EA, not a scalper. It holds a position around 16 hours
on average and takes roughly 20 trades per month. It is always in the market,
long or short, and reverses on the opposite signal.
- XAUUSD gold, M15 timeframe
- ATR trailing stop, stop and reverse
- No martingale, no grid, no averaging down, no hidden lot multiplication
- No fixed take profit, by design and for a measured reason, see below
- One position at a time, no pyramiding
- Fixed lot or percent of equity sizing
- Weekend flattening, optional
- Hedging and netting accounts both supported
- Full margin checks, never sends an order it cannot afford
WHY THE DEFAULT INDICATOR SETTINGS DO NOT WORK
This EA is built on the ATR trailing stop logic of the public UT Bot Alerts
indicator by Yo_adriiiiaan, core idea by HPotter, alerts version by QuantNomad.
The algorithm is public and free. What you are buying is the validation work.
The indicator ships with Key Value = 1. Measured over 10 months of real XAUUSD
M15 data, that setting loses money: profit factor 0.98, only 3 profitable
months out of 11.
This EA ships with Key Value 4.5 and ATR Period 10, the centre of a robust
zone: every one of the 84 combinations in the range Key Value 3 to 6 by ATR
Period 5 to 28 was profitable over the test period, median expectancy
+7.34 USD per trade. Performance collapses above Key Value 7, so this is a
real optimum and not a lucky spike on a grid edge.
THREE MEASURED FACTS THAT CHANGE THE RESULT
1. MT5's iATR is a simple moving average of True Range. Pine's atr is Wilder's
RMA. Only 45 of 106 buy signals coincide between them, and expectancy drops
from 13.42 to 8.57 USD per trade with the wrong one. This EA implements
Wilder's RMA.
2. The trailing stop is a signal evaluated on bar close, not a stop loss
order. Placing a broker stop at that level destroys 45% of the edge,
+2,831 down to +1,555 USD. This EA places no order there.
3. Fixed take profit does not work with this logic. Tested with ATR multiple
SL and TP brackets, only 19 of 154 combinations were profitable and the
train to test correlation was -0.14. The edge is entirely in the trailing
stop.
WHY M15 AND NOT M1 OR M5
Every timeframe was re-optimised separately, then the optima compared. Real
ticks, same period, 0.01 lot:
M1 -448 USD profit factor 0.97 2,192 trades
M5 +2,797 USD profit factor 1.91 171 trades
M15 +2,409 USD profit factor 1.82 150 trades
M30 +1,973 USD profit factor 1.80 136 trades
H1 +1,382 USD profit factor 1.53 123 trades
M1 loses money: transaction cost is about half the average gross gain per
trade. M5 posts the highest net on a single run but its parameter surface is
chaotic, expectancy swinging from +11.93 to -10.22 to +24.85 as Key Value
rises. M15 is unimodal and smooth, and the only timeframe in the top two for
robustness across both test windows, 79% and 81% of grid combinations
profitable. The M5 figure is a lucky draw, not an optimum.
RISK MANAGEMENT
Two sizing modes. In percent mode the risk unit is the trailing distance,
Key Value times ATR, median 46.63 USD, which is where the strategy actually
exits. Over the 81 losing trades of 2026 the loss to risk ratio has a median
of 0.72 and a maximum of 2.03.
Equity drawdown measured at each risk level, 10,000 USD deposit, compounding:
1% +4,755 USD drawdown 10%
2% +11,450 USD drawdown 19%
3% +21,945 USD drawdown 27%
5% +53,225 USD drawdown 30%
A 20,000 permutation Monte Carlo on trade order gives, at 5% risk, a median
drawdown of 34% and a 90th percentile of 45%.
A disaster stop at 3 times the trailing distance protects against
disconnection. It was never triggered in testing, so it costs nothing.
HONEST LIMITATIONS
Read this before buying.
The measured edge rests on 10 months of a single market regime. Gold was
exceptionally directional over the period. Permutation test p-values of 0.014
to 0.040 do not survive a Bonferroni correction across the 238 combinations
tested. The strong argument is the width of the profitable plateau, not
statistical significance.
The equity curve is not a straight line. It advances in two steps: a sharp
rise in January, then about five flat to negative months, then a second rise.
Two months carry 66% of the result. Buying at the wrong moment means months
without gains while still absorbing the drawdown.
There is no news filter and no regime filter. Ranging markets are where trend
following suffers, and this EA has nothing to protect you there.
Past performance does not predict future results. Run it on demo for two to
three months before committing capital.
REQUIREMENTS
- MetaTrader 5 build 2470 or later
- XAUUSD or XAUUSDm on an M15 chart
- Hedging or netting account
- Minimum balance 3,000 USD at 0.01 lot. Measured max drawdown at 0.01 lot
was 641 USD, already 21% of a 3,000 USD account
- Low spread account preferred, though the strategy is cost insensitive:
tripling spread and slippage costs only 0.54 USD per trade
- VPS recommended, the EA must be running at each M15 bar open
The set file used for every figure above is included, so you can reproduce
each backtest yourself. Questions welcome by MQL5 message.
========================================
TAGS
========================================
gold, xauusd, gold ea, gold robot, trend following, atr, trailing stop,
no martingale, no grid, m15, swing trading, expert advisor, mt5, trend ea
