Short answer: the most-boosted ATR trailing stop on TradingView, Chandelier Exit by everget (29,759 boosts), is also the free one to start with: its stop only tightens while the trend holds, it changes direction on a close through the last stop, and its alerts wait for the candle to close by default. Read its Buy and Sell labels with care: they're drawn on the live candle and can vanish. Of the other seven, only UT Bot v2 waits for the close for its labels and its alerts both, and two do something other than their names suggest: ceyhun's ATR Trailing Stoploss can loosen, and exit490's SuperTrend strategy trails its stop by a percentage, not by ATR.
Most lists name trailing stops.
This one reads them.
What we checked
We searched TradingView's scripts for six terms on 27 October 2026 ("atr trailing stop", "chandelier exit", "volatility stop", "supertrend", "trend following" and "trend pullback"), which returned 273 scripts. We took the eight most-boosted open-source scripts whose main job is an ATR trailing stop, a Chandelier Exit or a volatility stop, down to 2,573 boosts, and read every line that sets the stop, the flip and the alerts. No script of that kind in the range was left out for hidden code. Six questions:
- The stop: what is it built from (the close, the middle of the candle, its high or low, or the highest point of the last N candles), on what ATR, at what multiple?
- The ratchet: does the stop only tighten, and what resets it?
- The flip: a close through the stop, or a touch?
- When it decides: on a closed candle, or on the live one?
- Other timeframes: does it read one, and how?
- Alerts: what can it send you, and when?
SuperTrend scripts are a family of their own, and they're in our SuperTrend roundup. One SuperTrend-named script is here, exit490's SUPERTREND ATR WITH TRAILING STOP LOSS (5,074), because its title and its own description make the trailing stop loss its job. Just below the cut sit Trailing Stop Loss ATR + Alert by Dreadblitz (2,533), Chandelier Exit - Heikin Ashi by mpeick (2,521) and ceyhun's ATR Trailing Stop Strategy (2,488).
Two of the eight are strategies, exit490's and UT Bot v2, so they run in TradingView's Strategy Tester; neither sets a commission or slippage. One indicator, ceyhun's ATR Trailing Stop, prints an open-move panel. None prints a win rate.
The table
Boosts as TradingView's search showed them on 27 October 2026. ATR(22) means a 22-candle ATR.
| Script | Boosts | The stop, by default | Only tightens? | Flips on | Decides on | Alerts |
|---|---|---|---|---|---|---|
| Chandelier Exit [everget] | 29,759 | Highest close of 22 candles − 3 × ATR(22); lowest close + 3 × ATR(22) for shorts | Yes, while the last close holds | A close through the last stop | The live candle; alerts wait for the close by default | Direction change, buy, sell |
| ATR Trailing Stoploss (ceyhun) | 5,833 | Highest of (high − 2.5 × ATR(5)) over 10 candles; one line, no short stop | No: it drops when a high leaves the 10 candles | No flip; buy and sell on a close crossing it | The live candle | Buy, sell |
| SUPERTREND ATR WITH TRAILING STOP LOSS (exit490) | 5,074 | Middle of the candle ± 3 × ATR(1); the strategy's own stop is 3% below the entry, trailed by a percentage | Yes | A close through the last line | Every price update in real time (a strategy) | Two alertcondition() lines on the flip; as a strategy, alerts come from fills |
| ATR Trailing Stop by ceyhun | 4,838 | Two lines from the close: 0.5 × ATR(5) and 3 × ATR(10) | Yes | Each line on a close; signals when the fast line crosses the slow | The live candle | Buy, sell (the lines crossing) |
| Volatility Stop MTF (TradingView) | 4,514 | vStop() from TradingView's ta library: the close, length 20, 2 × ATR, on three times the chart's timeframe | In the library, not the script | Price crossing the stop, by its tooltips | The last closed higher-timeframe candle; breach marks live | Five, all off; once per bar by default |
| CDC ATR Trailing Stop V2.1 (2013) (piriya33) | 4,023 | Two lines from the close: 0.5 × ATR(5) and 2 × ATR(10) | Yes | Each line on a close; signals from the gap between them and its 9-period EMA | The live candle | Buy, sell |
| ATR + Trailing Stops (SimpleCryptoLife) | 2,793 | Each candle's low − 3 × ATR(14), high + 3 × ATR(14), on its own true range | Yes | A close through it (a wick touch optional) | The live candle | Cross up, cross down |
| UT Bot v2 - ATR Trailing Stop (QuantNomad) | 2,573 | The close ± 1 × ATR(10) | Yes | A close through the last stop | Closed candles | Buy, sell, once per bar close |
| Drift Desk (ours) | — | A pressure-shifted hlc3 ± 2 × ATR(14) | Yes, while the last close holds | A close through the last band | Closed candles | Flip, plan, 1R, resolved; JSON once per bar close |
Of the eight, only UT Bot v2 decides both its labels and its alerts on closed candles. Volatility Stop MTF does for its line and its trend changes, not for its breach marks; everget's does for its alerts, not for its labels. Of the seven whose code shows the ratchet, only ceyhun's ATR Trailing Stoploss has a stop that can loosen without a flip.
What the code says
Chandelier Exit [everget] is the most boosted, and the free one to start with. Written in Pine v6 and shared under GPL-3.0, it sets its long stop at the highest close of the last 22 candles less 3 times a 22-period ATR, and its short stop at the lowest close plus the same. A setting, "Use Close Price for Extremums", on by default, picks the close; turn it off for the highest high and lowest low. The long stop only rises while the previous close stays above it, and the short stop only falls while the previous close stays below. The script turns long when a close crosses above the last short stop and short when one crosses below the last long stop, and prints Buy or Sell at the turn. That test runs on the live candle, where the close is the current price, so a label can print and vanish before the candle ends. Its three alerts (direction change, buy and sell) don't have that problem by default: "Await Bar Confirmation", on by default, holds them for barstate.isconfirmed, the candle's close. It reads no other timeframe and has no strategy or table.
ceyhun's ATR Trailing Stoploss can loosen. In Pine v5 under MPL 2.0, its line is the highest value of (high − 2.5 × ATR(5)) over the last 10 candles. The code looks as if it chooses: one line checks whether the close is above that value and above the last close, but both of its branches return the same expression, so the check changes nothing, and a barssince call above it is computed and thrown away. Because the line is a 10-candle highest, it drops when a high leaves the window, so it isn't a ratchet. There is one line, with no short-side stop and no flip: Buy and Sell are a close crossing the line on the live candle, hidden on the chart by default, with an alert for each. Candles are coloured green above the line and red below. For its first 15 candles the line is just the close.
exit490's SUPERTREND ATR WITH TRAILING STOP LOSS trails by percentage, not by ATR. It's a strategy, written in Pine v4 in 2019 and shared under MIT, and its title and description put the trailing stop loss first, which is why it's here. Its line is a SuperTrend: the middle of the candle (hl2) less 3 times the ATR for longs, plus 3 times for shorts, ratcheting and flipping on a close. The ATR period defaults to 1, so the "ATR" is the current candle's true range, and the line jumps with every big candle. The strategy trades one side, long by default: it buys when the line points up and nothing is open, and sets its stop 3% below the entry. When a close is more than 1% above its reference price (the entry at first), the stop moves up to that close less 4% of the reference, and the reference becomes the stop, so in a steady rise the stop settles just under 4% below the close. It exits on a close at or below the stop, or when the line flips, and if the line still points up after a stop-out it buys again as soon as the position is flat. It's declared with calc_on_every_tick = true, so in real time it decides on every price update, while its history was worked out on closes, plus a recalculation after each fill (calc_on_order_fills = true). It stakes 100% of equity on each trade, from $1,000 of capital and 1 January 2019, with no commission or slippage, and its code has two alertcondition() lines on the flip; a strategy's alerts in TradingView come from its order fills and alert() calls, so don't count on those two.
ceyhun's ATR Trailing Stop signals on two lines crossing, one of them hidden. In Pine v5 under MPL 2.0, it runs two ATR trails on the close: a fast one 0.5 times a 5-period ATR away and a slow one 3 times a 10-period ATR away. Each rises with the close while this close and the last are above it, falls while both are below, and jumps to the other side when a close crosses it. Its Buy and Sell aren't price crossing a stop: they're the fast line crossing the slow, judged on the live candle, and the fast line is hidden by default, so the chart shows labels against one line while the other decides. Its two alerts fire on the same crossing. Candle colours (blue, green, yellow and red) are on by default. An info panel shows the price at the last signal, the candles since, and a "Profit" percentage from that signal's close to the current one: an open move, before costs, not a record.
Volatility Stop MTF is TradingView's own, and it reads the higher timeframe the safe way. Published by TradingView in Pine v6 under MPL 2.0 (its header says version 4, 14 April 2026), it takes its stop from vStop() in TradingView's ta library, fed the close, a length of 20 and an ATR factor of 2. That library's code isn't in the script, so this read can't show how the stop ratchets; the script's tooltips describe a trend change as price crossing the stop. By default the stop comes from a timeframe three times the chart's; steps of 60 minutes, a day, three days, a week, a month and a year, a fixed timeframe, or None (the chart's own) are the other choices. It asks for it with lookahead_on on the previous candle ([1]), which reads the last completed higher-timeframe candle and doesn't leak the future (how that works). So its line and its trend changes come from closed candles: a change shows on the chart once the higher-timeframe candle that made it has closed. A "Repainting HTF" setting, off by default, reads the live higher-timeframe candle instead. Its breach marks, on by default, are chart candles crossing the higher-timeframe stop, judged on the live candle. It has five alerts, all off until you tick them, sent once per bar by default (once per bar close is the other choice), with an optional delay in minutes. It refuses a timeframe that isn't higher than the chart's.
CDC ATR Trailing Stop V2.1 runs the same two-line engine, in Pine's second version. With no licence line, it has the same two trails from the close as ceyhun's ATR Trailing Stop and the same notes in its header, with the slow line at 2 times a 10-period ATR instead of 3 (the fast one is 0.5 × ATR(5)). Its signal is the gap between the two lines against a 9-period EMA of that gap: Buy when the gap is above zero and above its EMA after a bearish stretch, Sell the reverse, judged on the live candle. Its two alerts fire on that candle. Its arrows, off by default, are drawn from the previous candle's signal, so each arrow sits one candle after the one that alerted. Candle colours are off by default too; the slow line is green while the close is above it and red below.
SimpleCryptoLife's ATR + Trailing Stops measures from each candle's high and low. In Pine v5, with a copyright line and no licence, it sets its long stop 3 ATRs below each candle's low and its short stop 3 ATRs above its high, over 14 candles. Its ATR is its own: the candle's body, counting any gap from the last close, plus its wicks, each weighted 100% by default, which its notes say emulates the standard ATR; the average is RMA by default (the method its notes say TradingView's built-in atr uses), with SMA, EMA and WMA as options. The long stop only rises and the short stop only falls. It flips on a close through the stop by default, or on a wick touching it, and on a flip the new stop starts from the current candle's band; until the first flip it shows both lines. Nothing waits for the close, and its own notes say so: the current candle's drawings change until it closes. Its two alerts fire on price crossing the last stop, and its notes leave once per bar close to you, in TradingView's alert settings. A Running mode draws the bands without the trail.
UT Bot v2 waits for the close. QuantNomad's UT Bot v2, in Pine v6 under MPL 2.0, is a strategy. Its trail runs from the close, 1 times a 10-period ATR away: it rises while this close and the last are above it and flips when a close crosses it. Its own tooltip says higher multiples mean wider stops and fewer flips; at 1, the stop sits one ATR from the close. Buy and Sell need the cross and a confirmed candle (barstate.isconfirmed), and its two alerts are sent once per bar close. The strategy is always in the market, long on Buy and short on Sell, from 1 January 2020 to 1 January 2030 by default. Its strategy() call sets no commission or slippage, so add your own before reading its Strategy Tester figures. QuantNomad's original UT Bot Alerts, the same trail in Pine version 4, judges its Buy and Sell on the live candle instead; what its Key Value, ATR Period and Heikin Ashi settings change is read from its code.
Built from what, flipping on what
A trailing stop is a distance from a base. The eight use four bases:
- The close: ceyhun's ATR Trailing Stop, CDC's and UT Bot v2 hang the stop a multiple of ATR from the close and move it as closes move.
- The candle: exit490's measures from the middle of each candle (
hl2), SimpleCryptoLife's from each candle's low and high. - The highest point of the last N candles: the Chandelier Exit's base. everget's script hangs from the highest close of 22 candles by default (the highest high is a setting); ceyhun's ATR Trailing Stoploss takes the highest of (high − 2.5 × ATR) over 10.
- A library: Volatility Stop MTF calls TradingView's
vStop(), fed the close.
Every flip we could read happens on a close by default (ceyhun's ATR Trailing Stoploss has none, and Volatility Stop MTF's is inside its library); only SimpleCryptoLife's offers a wick touch. A flip on a close is only final when the candle closes: on the live candle, the close is the current price, so a script that tests it there can turn and turn back. That is the difference between the labels on everget's chart and its alerts.
Which settings
The defaults run from 0.5 × ATR(5) (ceyhun's fast line) to 3 × ATR(22) (everget's Chandelier Exit). Between them: 3 × ATR(14) (SimpleCryptoLife's), 3 × ATR(10) (ceyhun's slow line), 2.5 × ATR(5) (ceyhun's Stoploss), 2 × ATR(10) (CDC's slow line), 2 × ATR with a length of 20 (Volatility Stop MTF), 1 × ATR(10) (UT Bot v2) and 3 times the current candle's true range (exit490's). A wider multiple sits further from price and, as UT Bot v2's tooltip puts it, flips less often. None of the eight shows that its default is best. What each of the Chandelier Exit's three inputs changes in everget's code, with a drill that moves them on simulated candles, is in Chandelier Exit settings.
The fair way to choose is to fix a few versions in advance, pick one on an early stretch of history and check it on a later stretch it never saw, after costs. Our Drift Desk has that built in as an opt-in research lab: 12 versions (ATR 10, 14 and 21, each at 1.5, 2, 2.5 and 3 times), one picked on a training window only, then run on a later validation window, with 0.04% commission and 1 tick of slippage a side by default. It never changes your settings.
Ours
Drift Desk isn't on TradingView's search: its full Pine v6 source, under MIT, comes in Pine Pro Library, $49 once. It's an ATR trail with a moving centre. Each candle's pressure is read from where the close sits in its range (60%) and the body's share of the range, up or down (40%), weighted by relative volume capped at 3; an 8- and a 21-period EMA of that pressure, their spread divided by its 50-candle standard deviation, give a drift score between −3 and +3. The centre is the candle's hlc3 shifted by drift × ATR × 0.5, so up to 1.5 ATRs either way, and the bands sit 2 × ATR(14) above and below it. The lower band only rises while the last close holds above it, the upper only falls while the last close holds below, and the trail flips when a close crosses the last band. All of it runs inside barstate.isconfirmed, on closed candles only; on the live candle the line keeps the last closed value. How a SuperTrend-style band ratchets and flips is in the SuperTrend explainer.
A confirmed flip becomes an entry candidate only when its checks pass: a full history, a valid 20-candle volume window (a feed with no volume at all runs price-only), every optional filter you turn on (a trend EMA, path efficiency, timeframe agreement, a New York session, a higher-timeframe EMA, long only; all off by default), a stop at least a tick away, and no plan open or closing on that candle. The plan's stop isn't the trail. For a long it's the lowest low of the 10 candles before the flip, less 0.25 ATR (for a short, the highest high plus 0.25 ATR), rounded away from price to the tick, and it is set once and never moved. The target is 2R; 1R is marked but changes no order, and a plan still open after 120 candles is closed at the close. A gap through the stop exits at the open, and a candle that touches both the stop and the target counts as the stop. Size comes from a planned cash risk, 100 in the symbol's currency by default. Its optional timeframe-agreement and higher-timeframe EMA filters read the last completed candle of each timeframe ([1] with lookahead_on). It alerts on the flip, on a long or short plan, on 1R and when a plan resolves, and sends a JSON plan once per bar close, marked as excluding costs. What we measured on its version 1.3.1 is in Drift Desk: what we measured.
Drift Desk Premium, $49 once, does the work around each flip on the chart: it reads the bigger trend, waits for the pullback, sizes the plan to your lot step with fees in R, manages the stop (half off and the stop to entry at 1R, then the Drift trail) and scans 20 symbols with one alert. You place the orders. Premium is a toolset: its signals are not proven to earn more. Test them on your own market.
Check one yourself
- The base: find the line that sets the stop.
close - mult * atrtrails the close;hl2is the middle of the candle;ta.highest(hangs it from the top of the last N candles. - The ratchet: look for
math.max(with the previous stop in it, and the condition before it. Ata.highest(of something, with no previous stop in it, is a window, not a ratchet: it can drop. - The flip:
close >the previous stop flips on a close;high >flips on a touch. On the live candle, both read the current price. - The close: look for
barstate.isconfirmedaround the signal,alert.freq_once_per_bar_closeon the alert, or astrategy(call withoutcalc_on_every_tick. Without one of them, a label you see live may not be there when the candle closes. More in how to tell if an indicator repaints. - Other timeframes: find
request.security(.lookahead_onon a value with[1]reads the last completed candle; without the[1], it leaks the future into history. - The record: a strategy's Strategy Tester figures are only as fair as its commission and slippage, and neither strategy here sets any.
Limits
One code read, on 27 October 2026, of the versions TradingView served that day. Scripts change, and boosts measure popularity, not quality. We didn't read TradingView's ta library, so the formula behind Volatility Stop MTF isn't checked here. We build and sell Drift Desk and Drift Desk Premium, and we have no relationship with any author named here. Nothing here is financial advice.
Frequently asked questions
What is the best ATR trailing stop indicator on TradingView?
Of the eight most-boosted open-source ATR trailing stop, Chandelier Exit and volatility stop scripts, start with Chandelier Exit [everget] (29,759 boosts). Its stop only tightens while the trend holds, it changes direction on a close through the last stop, and its three alerts wait for the candle to close by default. Its Buy and Sell labels are drawn on the live candle, though, so one can print and vanish before the close. For a plain trail from the close, UT Bot v2 - ATR Trailing Stop by QuantNomad (2,573 boosts) waits for the close for its labels and its alerts both.
What does the Chandelier Exit by everget do?
It draws a long stop 3 ATRs below the highest close of the last 22 candles and a short stop 3 ATRs above the lowest close, with a 22-period ATR. The highest high and lowest low are an option; the highest close is the default. The long stop only rises while the previous close stays above it, and the script turns long when a close crosses above the last short stop and short when one crosses below the last long stop. It has three alerts (direction change, buy and sell) that wait for the candle's close by default, is written in Pine v6 and is shared under GPL-3.0.
What are the best ATR trailing stop settings?
No setting is proven best here. The eight scripts' defaults run from 0.5 times a 5-period ATR (the fast line in ceyhun's ATR Trailing Stop) to 3 times a 22-period ATR (everget's Chandelier Exit), with 3 × ATR(14), 2 × ATR with a length of 20 and 1 × ATR(10) in between. A wider multiple sits further from price and flips less often. To choose, test a few on your own market: pick one on an early stretch of history, then check it on a later stretch it never saw, after costs.
Does the Volatility Stop MTF indicator repaint?
Not by default. It reads its stop from the last closed candle of a higher timeframe, three times the chart's by default, the safe way to ask for one, so its line and its trend changes don't move once drawn. Its Repainting HTF setting, off by default, reads the live higher-timeframe candle instead, and that line can change until the candle closes. Its breach marks, chart candles crossing the higher-timeframe stop, are judged on the live candle, and its alerts fire once per bar unless you choose once per bar close.
What is an ATR stop loss indicator?
A stop line set a multiple of the Average True Range (ATR) away from price, so it sits further away when candles are bigger. A trailing one moves only in the trade's favour and flips to the other side when price closes through it. The scripts here differ in where they measure from: the close (ceyhun's ATR Trailing Stop, CDC's and UT Bot v2), the middle of the candle (exit490's), each candle's own high or low (SimpleCryptoLife's), the highest close of 22 candles (everget's Chandelier Exit) or the highest of each candle's high less 2.5 ATRs over 10 candles (ceyhun's ATR Trailing Stoploss).
Is there a free trailing stop indicator for TradingView?
Yes. All eight scripts in our read are free to add, with their code open. Four are shared under the Mozilla Public License 2.0 (both of ceyhun's, TradingView's Volatility Stop MTF and QuantNomad's UT Bot v2), one under GPL-3.0 (everget's Chandelier Exit), one under MIT (exit490's), and two carry no licence line (CDC ATR Trailing Stop V2.1 and SimpleCryptoLife's ATR + Trailing Stops).
Why did my Chandelier Exit buy signal disappear?
Because the label is drawn on the live candle. In everget's Chandelier Exit the direction turns as soon as the current price crosses the last stop, and the Buy or Sell label prints at once; if the candle then closes back on the other side, the label is gone. Its alerts don't have this problem by default: its Await Bar Confirmation setting, on unless you turn it off, holds them until the candle closes. Read the label only after the close.
Which ATR trailing stop does ProEA make?
Drift Desk, in Pine Pro Library, $49 once with its full Pine v6 source. Its trail is centred on each candle's average of high, low and close, shifted by a candle-pressure read of up to 1.5 ATRs, with bands 2 ATRs either side on a 14-period ATR. The bands only tighten while the closes stay on their side, and everything is decided on a closed candle. A flip becomes a paper plan only when its checks pass, with a set-once stop beyond the low or high of the 10 candles before it and a target at 2R. Drift Desk Premium, $49, adds the bigger trend, a wait for the pullback, size and fees before entry, managed stops (half off and the stop to entry at 1R, then the Drift trail) and a 20-symbol scanner. Premium is a toolset: its signals are not proven to earn more.



