What ATR measures
ATR measures how much price typically moves per bar, including gaps between bars. It is calculated in two steps:- True Range for each bar is the largest of:
- Current high − current low
- |Current high − previous close|
- |Current low − previous close|
- ATR is a moving average of the True Range over a chosen number of bars (the ATR length or period).
ta.atr(length), which uses an RMA (Wilder’s) moving average.
ATR in signal indicators
Volatility-based indicators typically use ATR to place a level a multiple of ATR away from price. Price must travel beyond that level to generate a signal. Two settings control this:
The multiplier usually has the larger effect on how often signals appear.
Setting names vary between scripts. In QuantNomad’s tools, the multiplier is Multipier in UT Bot v2, Stop Multiplier in UT Bot Pro, and Key Vaule in the Ultimate UT Bot Screener. The ATR length is ATR Period or Volatility Period.
Choosing a sensitivity
There is no universally correct setting. A practical approach:1
Start with the defaults
Default values are a reasonable baseline. In UT Bot v2 and UT Bot Pro, that’s a multiplier of 1 and a period of 10.
2
Change the multiplier first
Adjust it in small steps on the symbol and timeframe you trade, and watch how the number and timing of signals change.
3
Look at both trending and ranging periods
A setting that looks good in a strong trend may produce many false signals in a sideways market.
4
Beware of over-fitting
Settings tuned to look perfect on one stretch of past data rarely behave the same way on future data. Prefer settings that are reasonable across many periods over settings that are perfect on one.