Best volatility indicator settings for technical analysis
The best volatility indicator settings for technical analysis depend on what you need to measure. Use ATR for price-range distances, standard deviation for dispersion around a mean, and Bollinger BandWidth for relative band compression. ATR 14 and Bollinger Bands 20 with a multiplier of 2 are reference settings, not proven optima. Choose a range of settings that survives separate market periods rather than the single setting with the highest backtest profit.
Compare strategy parametersKey Takeaways
- ATR and the standard deviation of prices use price units. BandWidth is a ratio, commonly displayed as a percentage.
- Length controls the history included or smoothed. A band multiplier changes width without changing the underlying standard deviation.
- Short windows react sooner to a volatility change; long windows retain more of the previous regime. Neither response is always preferable.
- The calculations below use one hypothetical market. They illustrate indicator behavior and contain no trading-performance results.
Compare units before comparing settings
These indicators answer different questions. Their thresholds are not interchangeable, even when their lookback lengths match.
- ATR: smooths true range, including movement from the previous close. An ATR of 2 means two price units per bar on the selected timeframe. It can inform a stop distance, but it does not specify direction or a maximum possible loss.
- Standard deviation of closes: measures how far prices spread around their mean, in price units. Here, variance uses divisor n. The standard deviation of returns is a different quantity; neither a price standard deviation nor BandWidth is automatically annualized volatility.
- Bollinger BandWidth: 100 × (upper band − lower band) / basis. With a simple moving average basis and multiplier k, this is 100 × 2k × standard deviation / basis. It expresses width relative to price; a 4% width is not a 4% return forecast.
- Normalization: ATR divided by close and multiplied by 100 gives an ATR percentage. Keep the same timeframe and session when comparing it. Near-zero denominators make percentage measures unstable.
Use reference settings and a small comparison grid
TradingView documents 14 as the default ATR length with RMA smoothing, and 20 periods with a multiplier of 2 for Bollinger Bands. A period means a chart bar, so 14 hourly bars and 14 daily bars describe different horizons. Keep smoothing, price source and timeframe fixed while changing length.
- ATR experiment: compare lengths 7, 14 and 28 with the same RMA smoothing. These are an illustrative grid, not recommended trading settings.
- Dispersion experiment: compare 10, 20 and 40 closing prices, using the same standard-deviation convention and SMA basis.
- Band multiplier experiment: after choosing a length, compare 1.5, 2 and 2.5 separately. At a fixed basis and standard deviation, 2.5 creates 25% more width than 2. A fixed BandWidth threshold must be reconsidered when k changes.
- For stops, separate the ATR length from the stop multiple. Changing both at once makes it harder to explain why a result changed.
One hypothetical market, three volatility phases
This reproducible illustration has 80 daily bars in one hypothetical market, with prices in dollars. Bars 1 through 40 alternate closes of 99.50 and 100.50; bars 41 through 60 alternate 98 and 102; bars 61 through 80 return to 99.50 and 100.50. Odd-numbered bars take the lower close. The close before bar 1 is 100.50. There are no real dates, observed market prices or trading returns in this example.
- Each open equals the previous close. High equals the larger of open and close plus w; low equals the smaller minus w. Set w to 0.50 in the quiet phases and 1 in the expansion phase.
- Compute true range as the greatest of high minus low, absolute high minus previous close, and absolute low minus previous close.
- Seed each RMA with the average of its first n true ranges. Thereafter, ATR equals previous ATR × (n − 1) / n plus current true range / n. Carry the calculation across phase boundaries without restarting it.
- Compute price standard deviation over the last n closes with divisor n; use their mean as the Bollinger basis and a multiplier of 2. Round only the displayed results.
ATR sensitivity: fast response versus lingering memory
For this same price path, the values below are ATR(7), ATR(14) and ATR(28), in that order, rounded to three decimals. Length 7 responds sooner to expansion and then falls sooner when ranges contract. Length 28 remains above its initial value after 20 quiet bars because RMA retains a decaying influence from earlier ranges.
- Bar 40, end of the initial quiet phase: 2.000 / 2.000 / 2.000.
- Bar 45, five bars into expansion: 4.034 / 3.159 / 2.619.
- Bar 60, end of expansion: 5.805 / 5.065 / 4.040.
- Bar 65, five bars after contraction: 3.876 / 4.196 / 3.747.
- Bar 80, after 20 quiet bars: 2.186 / 2.722 / 3.013.
Standard deviation and BandWidth: window composition matters
At bar 45, standard deviations for lengths 10, 20 and 40 are 1.450, 1.087 and 0.847 dollars. Their BandWidths are 5.809%, 4.352% and 3.389%. These differ because each window contains a different share of expansion bars, and its mean can differ slightly. A hypothetical 4% width threshold would classify the 10- and 20-bar windows as above threshold while the 40-bar window remains below it.
- At bar 60: 10- and 20-bar standard deviations are both 2.000 dollars, giving 8.000% width. The 40-bar window still includes quiet observations: 1.458 dollars and 5.831%.
- At bar 80: 10- and 20-bar standard deviations are both 0.500 dollars, giving 2.000% width. The 40-bar window still contains all 20 expansion bars: 1.458 dollars and 5.831%.
- A rolling window can change when an old extreme leaves it, even without a new large move. RMA decays its older observations instead of removing all their influence at a fixed boundary.
- A steadily rising price series can have a large price standard deviation despite modest individual bar ranges. Interpret dispersion alongside range and direction rather than treating it as another ATR.
Test the grid on separate periods of your actual market
The illustration isolates the calculation; it cannot select a profitable parameter. For a real study, record one exchange symbol, one standard-candle timeframe, session and adjustment settings. Split its history chronologically into development, validation and a final untouched period. Supply enough earlier bars for indicator warm-up, but exclude those bars from the scored results.
- Define the regime labels before comparing strategy profits. One research design uses the ATR(14) percentage on the prior completed bar relative to its preceding 252 observations: below the 25th percentile, between the 25th and 75th, and above the 75th. These cutoffs are illustrative; keep them fixed while testing other lengths.
- If regime labels control entries, use only information available at that time. Grouping trades by future realized volatility is retrospective analysis and cannot serve as a live entry rule.
- Keep entries, exits, sizing, costs and execution timing constant. Change the volatility setting, then record trade count, exposure, net return and drawdown for each period and regime.
- Compare neighboring settings rather than selecting an isolated profit spike. Too few trades, performance concentrated in one shock, or a reversal after modest cost increases leave the result inconclusive.
- Preserve the final period for one evaluation after choosing the rule. Repeatedly tuning against it turns it into another development sample.
Account for confirmation and execution failures
ATR and bands can change while the current candle is forming. A close-confirmed rule uses the completed bar and therefore acts later than an intrabar rule. A daily filter on an intraday chart needs a separate decision about whether to use the last completed daily value. Confirming the intraday bar alone does not confirm the daily one.
- Low BandWidth describes compression, not the direction or timing of the next breakout. A breakout can reverse immediately.
- High ATR can follow the large move you hoped to anticipate. A wider ATR stop changes risk unless position size changes too; gaps can still fill beyond the intended stop.
- Use standard price candles for the baseline strategy test. Synthetic chart prices can distort fills; inspect the TradingView broker-emulator and order settings.
- Include commissions and slippage, and separate an indicator threshold crossing from the actual order-fill event. A backtest assumes an execution model rather than reproducing every historical tick.
Pineify next step
Test a defined volatility filter with Pineify
Use the Pine Script AI Coding Agent to draft a strategy with explicit volatility inputs, confirmation timing and date limits. Review the code in TradingView, then use Strategy Optimizer to test the input ranges. Export separate TradingView trade CSVs for the periods you defined and inspect each in Backtest Deep Report. Keep regime labels with your research records; a trade CSV alone does not identify market regimes. These tools help run and review a test, but do not establish a universal best setting.
Sources and contract references
Sources checked on 2026-10-16.
- TradingView: Average True RangeTrue range, default RMA smoothing, reference length and the limits of comparing absolute ATR values.
- TradingView: Bollinger BandsBand construction, basis, source and multiplier inputs. A band touch need not indicate a reversal.
- TradingView: Bollinger BandWidthPercentage-width formula and why a compression threshold depends on the instrument and timeframe.
- TradingView Pine Script: RepaintingUnconfirmed price inputs, higher-timeframe values and the delay introduced by confirmation.
- TradingView Pine Script: StrategiesBroker-emulator assumptions, non-standard charts, costs, lookahead bias, selection bias and overfitting.
Educational material, not investment advice. The numerical illustration uses invented prices and is not a backtest or a claim about any security. Indicator settings, generated code and historical results do not guarantee future returns. Trading can cause substantial losses.