# ATR-based Stop Distance

A Volatility concept (ATR family) in the LuxAlgo Library, with 1 indicator implementation.

## What is ATR-based Stop Distance?

ATR-based stop distance is the practice of placing a stop-loss a multiple of the [ATR](https://www.luxalgo.com/library/concept/atr/) away from the entry price, below for longs and above for shorts. Wilder's Average True Range measures how far a bar typically travels once gaps are accounted for, so a stop at, say, two ATRs sits beyond the market's typical single-bar travel rather than inside it. The distance self-adjusts: quiet instruments and quiet regimes produce tight stops, volatile ones produce wide stops, and the same multiple transfers across markets because ATR carries each instrument's price units.

The measuring stick has a specific pedigree. J. Welles Wilder introduced ATR in New Concepts in Technical Trading Systems (1978), defining true range as the largest of the bar's high-to-low span and the two gap-inclusive spans from the prior close, then smoothing it (14 periods in his original work). He built it for commodity charts full of limit moves and opening gaps, which is exactly why it suits stop placement: it prices in the jumpiness that a simple high-minus-low range misses.

The mechanism matters because many premature stop-outs are noise hits: exits triggered by routine fluctuation rather than by the trade idea failing. Scaling the stop to measured volatility puts the exit where ordinary wiggle is unlikely to reach it, and it links directly to sizing, since risk per unit equals the stop distance. The honest caveats: a stop is a trigger, not a guaranteed fill, gaps can jump straight through it, and no multiple eliminates the trade-off between being shaken out early and giving back too much.

The same arithmetic underlies a family of tools. Wrap the multiple around price or an average continuously and you get [ATR bands](https://www.luxalgo.com/library/concept/atr-bands/) and [Keltner Channels](https://www.luxalgo.com/library/concept/keltner-channels/); ratchet it behind the best price since entry and you get the chandelier and other volatility trails. Stop distance is the raw, single-use form: one measurement, taken at or after entry, that turns current volatility into a concrete exit level and a position size.

## How to set an ATR-based stop on a chart

The workflow runs from measurement to multiple to level, and the sizing follows from the same number.

1. Add ATR to the entry timeframe (14 periods with Wilder smoothing is the standard default) and read the current value in price units.
2. Choose the multiple by trade style: published practice mostly falls between about 1.5 for short-term trades and 3 for trend-following, to be validated on your own market.
3. Compute the level: entry minus multiple times ATR for longs, entry plus it for shorts; alternatively anchor beyond a structural point such as a swing low and add an ATR fraction as buffer.
4. Sanity-check the placement against the chart: the level should sit beyond obvious noise and ideally beyond the structure that would prove the idea wrong.
5. Derive size from the distance under [fixed-fractional](https://www.luxalgo.com/library/concept/fixed-fractional/) rules, so the account risks the same fraction whether the stop is tight or wide.
6. Decide up front whether the stop stays frozen or trails; if it trails, it should only ever tighten.

## How it's calculated

The stop offset expressed as a multiple of Average True Range, so the stop sits farther away when volatility is high and closer when it is low.

```
TR_t = max(H_t - L_t, abs(H_t - C_(t-1)), abs(L_t - C_(t-1)))
ATR_t = (ATR_(t-1) × (n - 1) + TR_t) / n
StopDistance_t = k × ATR_t
LongStop_t = P_ref - StopDistance_t
ShortStop_t = P_ref + StopDistance_t

  TR_t: true range of bar t
  H_t: high of bar t
  L_t: low of bar t
  C_(t-1): close of the prior bar
  ATR_t: Average True Range at bar t, Wilder smoothing seeded with an n-bar SMA of TR
  ATR_(t-1): prior bar's ATR value
  n: ATR length (commonly 14)
  k: ATR multiplier (commonly 2 to 3)
  P_ref: reference price, typically the entry price or the latest close
  StopDistance_t: stop offset in price units at bar t
  LongStop_t: stop level for a long position
  ShortStop_t: stop level for a short position
  t: bar index
```

Wilder smoothing is the standard ATR; some platforms compute ATR with an EMA or SMA of TR instead.

The Chandelier Exit variant anchors to the highest high (long) or lowest low (short) since entry rather than the entry price.

Position sizing often inverts the formula: position size = risk per trade / StopDistance.

## How traders use it

- Initial placement: set the stop a fixed multiple of ATR from entry, or anchor it beyond a structural invalidation such as a swing low and add an ATR fraction as buffer, blending the statistical and [structure-based](https://www.luxalgo.com/library/concept/structure-stop/) approaches.
- Trailing: ratchet the stop to a multiple of ATR below the highest high (or highest close) since entry so it only ever tightens, the logic behind the [chandelier stop](https://www.luxalgo.com/library/concept/chandelier-stop/) and many volatility trails.
- Position sizing: under [fixed-fractional](https://www.luxalgo.com/library/concept/fixed-fractional/) risk, size equals the account risk budget divided by the ATR stop distance, so wider stops automatically mean smaller positions instead of bigger losses.
- Cross-market consistency: because the distance is denominated in each instrument's own volatility, one rule set can govern stops on an index future, a forex pair, and a crypto pair without per-market tuning.
- Regime awareness: checking current ATR against its own recent history, via a [volatility percentile](https://www.luxalgo.com/library/concept/volatility-percentile-rank/) or a [range expansion](https://www.luxalgo.com/library/concept/range-expansion-contraction/) read, prevents setting multiples from an unusually quiet window that is about to normalize wider.

## ATR-based Stop Distance vs. related exits

- **Fixed Stops** (https://www.luxalgo.com/library/concept/fixed-stops/): A fixed point or percentage stop ignores current volatility, so it is noise-bait in wild regimes and needlessly wide in quiet ones. The ATR version re-derives the distance from recent data every time.
- **ATR Bands** (https://www.luxalgo.com/library/concept/atr-bands/): ATR Bands plot continuous envelope lines at ATR multiples around price or an average, a charting overlay. Stop distance is a single number measured from your entry; the bands visualize the same arithmetic without being an order level.
- **Volatility Stop** (https://www.luxalgo.com/library/concept/volatility-stop/): A volatility stop is a complete indicator: a trailing line that flips with trend, usually ATR-based under the hood. ATR-based stop distance is the raw recipe that such indicators, and manual traders, build from.
- **Keltner Channels** (https://www.luxalgo.com/library/concept/keltner-channels/): Keltner Channels wrap an EMA with ATR-multiple bands as a continuous overlay for reading trend and stretch. The stop distance applies the same ATR arithmetic once, from your own entry, to produce an order level rather than a chart envelope.

## FAQ

### What ATR multiple should I use for a stop-loss?

There is no universal answer. Published practice commonly falls between about 1.5 and 3 ATRs, with short-term trades toward the low end and trend-following systems toward the high end (the classic chandelier exit used three). Smaller multiples exit sooner but get shaken out more often; larger ones survive noise but give back more. Test on your own market and timeframe.

### Does an ATR stop cap my maximum loss?

No. A stop defines where the exit order triggers, not the fill you receive. Gaps, thin books, and fast markets can execute you well beyond the level, so the ATR distance is a planning number for expected risk, not a hard floor. Conservative sizing and care around known event risk are the necessary complements.

### Should the stop be recalculated when ATR changes after entry?

Conventions differ. Many traders freeze the initial stop once placed and only move it in the trade's favor, since widening a stop after entry quietly enlarges the risk the position was sized for. Trailing variants do recompute each bar, but they are built to ratchet one way, tightening as the move progresses.

### Is an ATR stop better than a percentage stop?

It adapts where a percentage stop cannot. Two percent of price is the same distance in a dead market and a wild one, while an ATR multiple widens and tightens with measured conditions, which usually places the exit more sensibly relative to noise. The percentage stop's virtues are simplicity and predictability of risk in account terms; the ATR stop wins when volatility regimes shift.

### Which timeframe's ATR should the stop use?

The default is the timeframe you trade from, since that is the noise your position must survive bar to bar. Some traders take the measure one level higher for extra buffer on swing entries, accepting smaller size in exchange. Whichever you choose, keep it consistent: mixing signal timeframes and stop timeframes ad hoc makes results impossible to attribute.

### Do ATR stops work in crypto and forex?

Yes, and the transferability is the point: the distance is measured in each market's own volatility, so the same rule set spans an index future, a currency pair, and a crypto pair without per-market constants. The practical differences are session structure and event risk, such as weekend gaps in crypto and news spikes in FX, which argue for the same multiple discipline plus event awareness.

## Implementations in the Library

- ATR-based Stop Distance (LuxAlgo): https://www.luxalgo.com/library/indicator/atr-based-stop-distance/

## Related concepts

- ATR: https://www.luxalgo.com/library/concept/atr/
- ATR Bands: https://www.luxalgo.com/library/concept/atr-bands/
- ATR Expansion/contraction: https://www.luxalgo.com/library/concept/atr-expansion-contraction/

---

Source: https://www.luxalgo.com/library/concept/atr-based-stop-distance/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/