ATR-based Stop Distance
By LuxAlgoApr 26, 2026
ATR-based Stop Distance puts the volatility-sized stop on the chart before the trade. The build measures the Average True Range with a selectable smoothing and timeframe, multiplies it, and plots the resulting Long Stop and Short Stop levels around an anchor — each bar's close by default, or a fixed entry price for a live position — turning ATR-based stop distance into a placement gauge. Gradient fills show the room each stop allows; the dashboard restates the distance in price, percent and ticks.
How to Trade the ATR-based Stop Distance?
- Close anchor: shows where an ATR stop would sit for an entry at that bar's price — a pre-trade sizing check that adapts with volatility.
- Entry Price anchor: pins both levels to an actual fill; with Freeze ATR at Entry on, the distance is measured once on the entry bar so the placed level never widens.
- Stop-hit alerts: fire when price trades to a level as it stood on the prior bar — the order a trader would actually have been holding.
ATR-based Stop Distance Settings
- ATR Length (default 14): the averaging window from Wilder's original work.
- Smoothing (default RMA (Wilder)): RMA reproduces the classic ATR; SMA, EMA and WMA react differently.
- ATR Timeframe (default: chart timeframe): point it one timeframe up when a swing entry wants more room.
- ATR Multiple (default 2.0): the stop distance in ATR units.
- Anchor (default Close), Entry Price (default 0, falling back to the latest close), Entry Time (optional) and Freeze ATR at Entry (default on): the fixed-entry workflow.
- Show Dashboard (on) with Position (Top Right) and Size (Small); style: Long Stop, Short Stop, Entry Line and Gradient Fill (all on), Line Width (default 1).
Frequently Asked Questions
When would I use this instead of the Chandelier Exit?
The Chandelier Exit hangs its stop an ATR multiple off the best level since entry, ratcheting as the trade works — a management tool. This build is a placement gauge for the initial stop: anchored and frozen, it holds the level fixed. Place with one, trail with the other.
Which ATR multiple fits my trading?
The 2.0 default sits mid-range of common usage, running from roughly 1.5 on short-term trades to 3 for trend-following. Smaller multiples keep losses tighter but fall to routine fluctuation more often — test the trade-off on your own market.
Why freeze the ATR at the entry bar?
It encodes the convention of never widening a stop after entry: the distance is computed once, on the bar the position started, and stays put. Disable it and the levels re-derive from the live ATR, expanding when volatility rises.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
