UT Bot Alerts (MQL5)
Category: trend, volatility
A trend-following signal indicator that combines ATR-based trailing stops with price crossovers to identify momentum shifts.
Formula
loss = ATR(n) * Coef \\ \text{TrailingStop} = \begin{cases} \max(\text{Prev}, Close - loss) & \text{if } Close > \text{Prev} \text{ and } Close[1] > \text{Prev} \\ \min(\text{Prev}, Close + loss) & \text{if } Close < \text{Prev} \text{ and } Close[1] < \text{Prev} \\ Close \pm loss & \text{otherwise} \end{cases} \\ \text{Signal} = Close \text{ crosses } \text{TrailingStop}
Inputs
- AtrCoef (default: 2.0)
- AtrLen (default: 1)
See signal primitives and every published strategy that uses UT Bot Alerts (MQL5) on WOBR StrategyVerse.