Skip to main content
On this page

UT Bot Indicator: ATR Signals, Settings, and Backtesting

· 10 min read
Pineify Team
Pine Script and AI trading workflow research team

UT Bot uses an ATR-based trailing reference to identify changes in price direction. Its buy and sell labels are indicator events, not a verified trading record or automatically managed broker positions. To evaluate the tool, start with the calculation, distinguish crossing events from continuing states, and define how a signal becomes an order.

UT Bot indicator example

What Makes the UT Bot Different?​

The public UT Bot Alerts script by QuantNomad documents its lineage and alert-oriented implementation. Scripts with similar names can differ, so save the author, version, and settings when evaluating one. This article describes the UT Bot Alerts component implemented in Pineify.

Its central reference is a stateful trailing level whose candidate distance is ATR × Key Value. The calculation responds to recent price range rather than using a fixed currency distance. That adaptation does not establish better returns or eliminate whipsaws.

Understanding How UT Bot Works​

Pineify calculates ATR over the selected period and multiplies it by Key Value. With the Heikin-Ashi option disabled, the source is the chart close. The trailing level uses the prior level and the relationship of current and previous source values to it.

When both source values remain above the previous level, the new level is the greater of the previous level and source minus the ATR distance. When both remain below it, the level is the smaller of the previous level and source plus that distance. When the source changes sides, the reference resets to the corresponding side of the source.

This matters when volatility rises: a larger ATR distance does not simply move an established long-side trail downward, because the continuing long-side branch ratchets with a maximum. The short-side branch uses a minimum.

OutputMeaning in the componentWhat it does not establish
Trailing stopCalculated reference levelA protective order actually placed with a broker
Buy signalSource above the trail with an upward crossingA profitable entry
Sell signalSource below the trail with a downward crossingAn automatic close or short order
Position stateInternal directional stateActual account holdings
Bar-buy/bar-sell statesSource above/below the trailA new crossing on every colored bar

The implementation uses an EMA of length one in the crossing calculation. That is effectively the selected source, rather than a separate multi-bar trend filter.

How to Set Up UT Bot on TradingView​

  1. Select UT Bot in Pineify's indicator workflow.
  2. Begin with a standard price chart and record the symbol, exchange, session, and timeframe.
  3. Set Key Value, ATR period, and the Heikin-Ashi source option. The component defaults are 1, 10, and disabled respectively.
  4. Generate the script, open it in TradingView's Pine Editor, check compilation, and inspect the plotted trailing level and signal events.
  5. If using alerts, configure the condition and frequency to match the rule you intend to trade. Test several new signals before connecting any execution workflow.
Adding UT Bot in Pineify

The current Pineify component supports the current symbol and timeframe. A higher-timeframe filter requires a separately specified implementation; it is not automatically provided by selecting UT Bot.

The Best Pine Script Generator

Reading UT Bot Signals​

Primary Signals and Confirmation​

A buy event requires an upward crossing of the trailing reference and a source value above it. A sell event uses the opposite relationship. Continuing above or below the line produces a state, not repeated fresh events.

The calculation does not itself require the realtime bar to be confirmed. Price and ATR can change while a bar is open, and an apparent crossing can disappear before its close. For a strategy defined on completed bars, use matching close-based conditions and alerts. This addresses that timing choice; it does not prove every possible script or data configuration is non-repainting.

TradingView's alert documentation explains frequencies and stored script/settings snapshots. Recreate a running alert when changing settings that should affect its behavior.

A Defined Filter Experiment​

For an educational long-only test, take a completed buy event only when actual close is above its 200-period EMA. Enter at the next bar's modeled open. Exit on a completed sell event, with any protective stop specified independently.

Compare this with the unfiltered buy/sell baseline using the same sizing and exits. The EMA length is a chosen research parameter. Record both removed winners and removed losers; a filter is not useful merely because it makes fewer labels appear.

UT Bot Settings and Trading Styles​

Key Value controls the ATR multiplier. Increasing it increases the candidate distance for a given ATR and generally makes the reference less sensitive. Decreasing it brings the candidate distance closer. The full level is path-dependent, so this is not a guarantee that signal counts change monotonically in every sample.

ATR period controls the range estimate. A shorter period responds more quickly to recent range changes; it is not a direct profitability setting. Change one input at a time so you can identify its effect.

ExperimentCandidate valuesControls
Multiplier sensitivityKey Value 1, 2, 3ATR period 10, standard close source
ATR lookback sensitivityATR period 10, 14, 20Key Value 1, standard close source
Source comparisonHeikin-Ashi option off/onSame chart, parameters, and actual-price fills

These integer values are illustrative research candidates, not optimized recommendations. They also match the integer parameter used by the current underlying Pineify UT Bot function.

Day Trading: 1–15 Minute Charts​

Record trading hours and the spread/commission assumptions. More frequent trading increases the importance of costs. Check whether the available intrabar data supports your intended stop and target simulation, especially when both could be touched within one bar.

Swing Trading: 1–4 Hour Charts​

Define overnight holding rules and model gaps. A signal at a completed bar is not an assurance that the next available entry will match that bar's close. Keep the same execution convention when comparing parameters.

Position Trading: Daily and Longer Charts​

Allow sufficient warm-up for the stateful calculation and show how many completed trades remain. A small sample can produce unstable summary statistics. Include the test dates and individual trade ledger rather than reporting a percentage alone.

Backtesting Your UT Bot Strategy​

First specify whether sell signals close longs, open shorts, or both. These choices produce different exposure and results. Then define entry timing, position sizing, protective stops, targets, repeated-signal behavior, and fees.

A reproducible baseline can use one long position at a time, entry following a completed buy event, exit following a completed sell event, and next-bar fills. A second experiment can add a protective stop. Do not treat the indicator's plotted trail as an executed stop unless the strategy explicitly submits and updates an order at that level.

Use standard chart prices for fills and consult TradingView's strategy documentation for broker-emulator and order-timing assumptions. An indicator alone does not generate a Strategy Tester report.

Metrics to Record​

  • Net return after commission, slippage assumptions, and any relevant financing.
  • Maximum drawdown and the dates of the decline.
  • Trade count, exposure, holding period, and consecutive losses.
  • Average realized win and loss, alongside win rate.
  • Profit factor with its underlying gross profit and gross loss; a tiny loss sample can make it misleading.

Select parameters on an earlier period and evaluate the frozen rules on later data. Save both the specification and the trade export so a result can be reproduced. No win rate, profit factor, or return here is presented as an observed UT Bot test.

Combining UT Bot with Other Indicators​

Use each addition for a defined purpose: an EMA for a trend condition, a volume threshold for a participation condition, or a confirmed price level for invalidation. Change one component at a time and preserve the same exits when testing an entry filter.

Several indicators calculated from price can agree because they use similar information. Treat agreement as a rule to evaluate, not proof of independent confirmation. Explicit comparisons are more useful than a stack of favorable chart examples.

Common Mistakes and How to Avoid Them​

Trading Every Colored Bar​

Bar color describes a continuing relationship to the trail. Use the crossing output if the rule calls for a new signal, and define whether additional entries are permitted.

Assuming the Trail Controls Account Risk​

The plotted level is not a broker order. Quantity, order placement, gaps, and execution determine actual risk. Size from an explicit currency risk budget and actual-price invalidation distance, adjusted for the instrument's point value and lot size.

Selecting a Timeframe After Seeing the Winner​

Record the intended market and timeframe before evaluating candidates. If you explore several, disclose the search and retain a separate period for assessment.

Changing Rules After Each Loss​

A regime filter is testable only when its conditions are defined in advance. Preserve versions when changing parameters so the combined record does not imply one unchanged strategy produced all results.

Advanced UT Bot Techniques​

Heikin-Ashi Source Selection​

In the Pineify implementation, enabling Heikin-Ashi replaces the signal source with a requested Heikin-Ashi close at the chart timeframe. ATR is still calculated from the chart's OHLC. On a standard chart, that combines a synthetic close source with standard-chart ATR; it does not switch the entire calculation to Heikin-Ashi OHLC.

TradingView explains that non-standard chart values are synthetic. Use actual prices for fills, and do not interpret a Heikin-Ashi close as an available execution price. Changing the chart itself to Heikin-Ashi also changes the chart data used by calculations, creating a different experiment.

Multi-Timeframe Analysis​

If adding a higher-timeframe filter, specify how confirmed values become available on the lower timeframe. An unfinished higher-timeframe bar can change. The selected UT Bot component alone does not define that data-request behavior.

Dynamic Position Sizing​

If size depends on a stop distance, calculate it from the intended entry and explicitly defined stop, then cap it for available capital and instrument constraints. A smaller ATR can imply a larger calculated position, so a separate size cap is necessary to express a bounded exposure rule.

Frequently Asked Questions​

What does Key Value do?

It multiplies ATR to form the candidate trailing distance. A higher value increases that distance for the same ATR and generally reduces sensitivity; the stateful calculation still determines the actual trail and signals.

What are Pineify's UT Bot defaults?

Key Value is 1, ATR period is 10, and the Heikin-Ashi source option is disabled. These are starting values, not proven optimal settings.

Does a buy label place a trade?

No. It marks a calculated event. Strategy orders, alerts, and any broker connection require separate configuration and verification.

Can UT Bot signals change before the bar closes?

Yes. Current-bar price and ATR values can change. If your rule uses completed bars, align its conditions and alert timing with bar confirmation and inspect the actual script behavior.

Does the Heikin-Ashi option improve results?

No general advantage is established here. It changes the signal source to a synthetic close. Compare both versions under identical actual-price execution assumptions and costs.

What win rate should I expect?

There is no universal UT Bot win rate. A meaningful result requires the exact script, settings, instrument, dates, entry and exit rules, costs, and trade sample.