ATR Strategy Guide: Stop Distances, Position Sizing, and Testing
Average True Range (ATR) measures recent price-range volatility, including gaps. It can supply a consistent unit for stop distances, position sizing, and volatility filters. It does not predict direction or guarantee that a stop will survive ordinary price fluctuations. An ATR strategy still needs explicit entry, exit, sizing, and execution rules.
Calculate ATR Correctly
For each bar, true range is the largest of the high–low range, the absolute difference between high and previous close, and the absolute difference between low and previous close. This incorporates gaps relative to the previous close.
Wilder's smoothing uses a weight of 1 divided by the length for the newest true range. At length 14, the update is previous ATR multiplied by 13, plus current true range, all divided by 14. This is the RMA convention, not the ordinary EMA's weight of 2 divided by length plus one. TradingView's ATR documentation identifies RMA as its default and describes alternative smoothing settings.
A period means a chart bar: ATR(14) on a five-minute chart summarizes five-minute true ranges, not fourteen days. Keep the timeframe and smoothing method visible when recording values.
Position Sizing: Check the Units
For shares priced in the account currency, planned loss per share is the distance between entry and stop. If the stop distance is an ATR multiple:
Shares = cash risk budget ÷ (ATR × stop multiplier)
ATR already has price units. Multiplying it by the asset price again gives the wrong dimensions for ordinary share sizing. For futures or other contracts, include the monetary value per price point and any required currency conversion:
Contracts = cash risk budget ÷ (stop distance in points × value per point per contract)
Round down to the permitted lot size and check notional, leverage, margin, and portfolio exposure. The calculated loss assumes execution at the planned stop; gaps, slippage, and fees can make the realized loss larger.
Hypothetical Share Example
Suppose the risk budget is $100, ATR is $2, and the chosen stop is two ATR from entry. The planned stop distance is $4 per share, so the calculation gives 25 shares before costs. If ATR rises to $4 before a new entry and the same multiplier is retained, the size becomes 12 shares after rounding down.
Those are arithmetic examples, not recommended risk levels. If ATR is zero, unavailable, or extremely small, do not let division produce an invalid or excessive order. Apply an explicit maximum position limit and a minimum economically meaningful distance.
Initial Stops and Trailing Stops Are Different Rules
An initial long stop can be entry price minus an ATR multiple; a short stop can be entry price plus that distance. Decide whether the ATR is frozen at signal time or measured at fill time. If the order fills later or gaps, the difference matters.
A trailing rule additionally needs an anchor and a policy for updating. For example, a long-side candidate might be the highest price observed since entry minus a multiple of current ATR. A one-way trail retains the larger of that candidate and the previous stop so it never moves downward. Without that constraint, an ATR expansion can loosen the stop and increase risk.
Also specify when an updated stop becomes active. A historical bar contains a high and a low but does not always reveal their order. A simulation that raises a stop using the bar's high and then assumes an earlier low hit that new stop can misrepresent execution. Review TradingView's broker-emulator assumptions.
Wider stops do not automatically improve a strategy. They can reduce stop frequency while increasing loss per unit and changing the payoff distribution. Match position sizing to the intended distance and evaluate the complete rule.
A Breakout Hypothesis With Available Information
For an illustrative daily breakout test, calculate the highest high of the previous 20 completed bars, excluding the signal bar. Add a chosen multiple of the previous completed ATR to create a threshold known before the current bar closes. A close above that threshold can be the entry signal; define the actual order timing separately.
Excluding the current bar is essential. A current close cannot exceed the highest high that includes its own high plus a positive ATR buffer. That formulation would make the intended long condition impossible under ordinary OHLC data.
Define a corresponding exit, initial stop, size, maximum positions, and costs before running the test. Keep partial exits and trailing-stop activation out of the first experiment unless their order and quantity rules are fully specified. They can be added as separate variants after the baseline behaves as intended.
No SPY trade count, win rate, or historical return is reported here. Those require the exact source, feed, dates, inputs, and trade ledger.
Use ATR for Comparison Carefully
An ATR of 5 has different significance for an asset priced at 50 than one priced at 500. A normalized comparison can use ATR divided by price, multiplied by 100, provided the prices are positive and the units are appropriate. This expresses recent range relative to price; it is not the same statistic as the standard deviation of returns.
A volatility filter might select periods where normalized ATR is above a predefined threshold or relative to its own historical distribution. Choose that rule before testing. Low ATR is a valid observation of recent quiet conditions, not proof that the indicator has stopped working.
Likewise, reaching 80% or 95% of yesterday's ATR does not impose a ceiling on today's move. ATR is an average of past ranges, not a daily range budget or a confidence bound. News and gaps can produce much larger moves.
Evaluate Settings Without Chasing the Best Chart
Length 14 and a stop multiple such as 2 are reproducible starting assumptions, not universal optima. Shorter smoothing reacts faster; longer smoothing changes more slowly. Neither implies a higher net return.
Compare a small predeclared set of variants over the same data and execution assumptions. Include net results, drawdown, turnover, exposure, stop frequency, and average win and loss. Reserve later data for evaluation and examine sensitivity around the selected values. A setting that succeeds only at one exact parameter combination may depend heavily on the sample.
Do not compare two consecutive sets of twenty paper trades as though the multiplier were the only difference: market conditions also changed. Matched historical periods or a properly designed prospective comparison make the attribution clearer.
Questions About ATR Strategies
Does ATR indicate whether to buy or sell?
No. It measures range volatility. A separate rule supplies direction.
Should an existing stop widen when ATR rises?
Only if the strategy explicitly permits that change and accounts for the increased loss. Recalculating volatility is not permission to expand the original risk budget.
What is the difference from standard deviation?
ATR averages true ranges. Standard deviation measures dispersion of the chosen series, often returns. Their units, interpretation, and response to data differ.
Can Pineify build an ATR rule?
Pineify can help configure supported indicators or draft Pine Script from explicit requirements. Check the generated formula, order timing, and final syntax, then inspect the simulated trades. Code generation does not verify an edge or guarantee a stop price.

