UT Bot
Oct 25, 2019

The UT Bot indicator generates trend-following signals by utilizing an Average True Range (ATR) trailing stop to highlight potential market entries and exits.
Usage
The Usage of the UT Bot revolves around identifying trend reversals through visual labels and bar coloring. Traders typically look for the following outputs:
- Buy/Sell Signals: Labels appear on the chart when the price crosses the volatility-based trailing stop. A "Buy" signal is triggered when the price closes above the stop line, while a "Sell" signal occurs when it closes below.
- Bar Coloring: The indicator automatically changes the color of the price bars to reflect the current trend. Green bars signify a bullish trend, and red bars signify a bearish trend.
- Sensitivity Tuning: By adjusting the "Key Value," users can filter out market noise. A higher value makes the indicator less sensitive, resulting in fewer signals that capture longer-term trends, whereas a lower value increases sensitivity for short-term scalping.
Details
The script is constructed using a trailing stop logic based on the Average True Range (ATR). It calculates the volatility of the asset over a specific period and multiplies it by a user-defined constant to create a buffer around the price.
The implementation follows these core steps:
- Volatility Calculation: It computes the ATR for the chosen period to measure current market volatility.
- Trailing Stop Placement: The stop level is calculated by subtracting (for uptrends) or adding (for downtrends) the product of the Key Value and the ATR from the price.
- Trend Detection: The script tracks whether the price is above or below the previous trailing stop. If the price crosses the stop, the trend direction flips, and the stop is recalculated from the new position.
This logic is a refactored and optimized version of the classic UT Bot concept originally developed by community contributors such as @Yo_adriiiiaan and HPotter.
Settings
- Key Value: A floating-point multiplier that determines the sensitivity of the indicator. Increasing this value moves the trailing stop further from the price, reducing the number of signals.
- ATR Period: An integer setting that defines the lookback period for the Average True Range calculation. This determines how much historical price volatility influences the current stop level.
FAQ
How do I reduce the number of false signals in sideways markets? You can increase the "Key Value" setting to make the indicator less sensitive to minor price fluctuations, or increase the "ATR Period" to smooth out the volatility calculation.
Can this indicator be used for automated alerts? Yes, the script includes built-in alert conditions for both "Buy" and "Sell" signals, allowing you to receive notifications or link the script to external execution platforms.
How can I get access to the UT Bot? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.