UT Bot Gold ATR Trailing Stop MT5

UT Bot Gold ATR Trailing Stop MT5

Free MT5 port of the well known UT Bot Alerts indicator, tuned for gold
(XAUUSD) on M15. Buy and sell signals from an ATR trailing stop, with alerts.

Original Pine Script by Yo_adriiiiaan, core idea by HPotter, alerts version by
QuantNomad. The algorithm is public and this port is free.


WHAT IT DOES

An adaptive trailing stop follows price at a distance set by the Average True
Range. When price crosses the stop line, the indicator prints a buy or sell
arrow and can alert you. It is a trend following tool: it does not predict
tops and bottoms, it tells you when price changes its relationship with a
volatility based stop.

  - Trailing stop line on the chart
  - Buy and sell arrows
  - Alerts: popup, mobile push, email - each optional
  - Heikin Ashi source option, as in the original script
  - Any symbol, any timeframe
  - Incremental calculation, no slowdown on long histories


THE ATR DETAIL THAT CHANGES THE SIGNALS

MetaTrader 5's built in iATR() is a simple moving average of True Range.
Pine Script's atr() is Wilder's RMA. These are two different calculations.

Measured on 20,006 real XAUUSD M15 bars, comparing the two:

  - average difference between the two ATR values: 9.9%
  - only 45 out of 106 buy signals occur on the same bar

This indicator implements Wilder's RMA directly, so it reproduces the Pine
behaviour. If you use another MT5 conversion, it is worth checking which of
the two it uses, because the arrows will not appear on the same candles.


GOLD SETTINGS: WHY 4.5 AND NOT 1

The original script ships with Key Value = 1. On XAUUSD M15 that setting was
tested over 20,006 real bars and it lost money: profit factor 0.98, only 3
profitable months out of 11.

The defaults here are Key Value 4.5 and ATR Period 10, taken from a grid
search on the same data. In that test every one of the 84 combinations in the
range Key Value 3-6 by ATR Period 5-28 came out profitable, so the setting
sits in the middle of a broad zone rather than on a lucky spike.

These values were validated on XAUUSD M15 only. On other symbols or other
timeframes they have not been tested. Retest before relying on them.


ABOUT REPAINTING

Values on closed bars never change. The bar that is still forming can change
until it closes, which is true of any trailing stop indicator that reads the
live price.

Alerts fire only on a closed bar, and only once per signal. You will not be
woken up by a candle that reverses before it closes.


WHAT THIS IS NOT

An analysis tool. It does not place orders. It gives entries but no exits, no
position sizing and no risk management, and it has no filter for ranging
markets, which is where trend following tools struggle.

Nothing here is investment advice. Past performance does not predict future
results. Test on a demo account first.


PARAMETERS

  Key Value      ATR multiplier for the trailing stop. Higher means fewer and
                 slower signals. Zone tested on XAUUSD M15: 3.0 to 6.0
  ATR Period     Wilder RMA period. Zone tested: 5 to 28
  Heikin Ashi    use Heikin Ashi close instead of standard close
  Alert popup    terminal alert window
  Alert push     mobile notification, needs your MetaQuotes ID in the terminal
  Alert mail     email, needs SMTP configured in the terminal


AUTOMATED VERSION

This indicator gives the signals. If you want the same logic traded
automatically, with position sizing, weekend flattening and the risk controls
this indicator does not have, see the Expert Advisor version:


Questions and bug reports are welcome by MQL5 message. Tell me the symbol and

timeframe and I will look into it.



========================================

TAGS

========================================


ut bot, gold, xauusd, atr, trailing stop, trend, signals, alerts, buy sell,

heikin ashi, mt5, scalping, trend following

作者的更多信息
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
筛选:
无评论
回复评论