Skip to content
All library documents

Implementing a Non-Repainting ATR Trailing-Stop UT Bot Indicator

Article MQL5 articles

Summary

The article explains the UT Bot Alerts concept and describes an MQL5 implementation designed for automated use. It derives a trailing-stop distance from ATR multiplied by a user-selected factor: a wider distance generally reduces signal frequency, while a narrower one makes the stop more responsive. The stop trails price in the direction of the current trend, and a price crossover flips the trend state and can produce a buy or sell signal. The implementation exposes ATR period, multiplier, and a choice between standard and Heikin Ashi source prices.

The design emphasizes stable closed-bar values, documented buffers for signals, trend state, and stop levels, and separate functions for calculations and display. The article describes these properties and integration into Expert Advisors and other tools, but the supplied text does not provide quantitative backtest results or evidence that the signals are profitable. ATR-based trend signals can lag and may behave differently across instruments and settings, so they require independent testing before use.

Key ideas

  • The UT Bot logic sets trailing-stop distance using ATR and a configurable multiplier.
  • A crossover of price and the stop changes the trend state and can trigger a directional signal.
  • The indicator supports standard or Heikin Ashi source prices and exposes parameters for sensitivity.
  • The implementation aims to keep closed-bar historical signals stable and make buffers accessible to automated systems.
  • The article explains implementation design but provides no quantitative evidence of strategy profitability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.