VALYNOX
VALYNOXSTRATEGY RESEARCH TECHNOLOGY
VALYNOXMultiAlphasMultiAlphas
ACADEMY / Entries, exits and risk control

ATR trailing stop: the rule, period, multiplier and how to test them

An ATR trailing stop sits a set number of ATRs below the highest price since entry and only moves in the trade's favour. The rule has two parameters, the ATR period and the multiplier. Start with 14 bars and 2 to 3 ATR on index futures, test a coarse grid with costs, and pick from a stable region rather than the best cell.

By · Published · updated · Editorial policy

Contents
  1. How does an ATR trailing stop work?
  2. What is ATR and why does it adapt to volatility?
  3. Which multiplier and period make sense for index futures?
  4. How does an ATR trailing stop compare with a fixed-tick stop?
  5. How do you test multipliers and periods on the same trend strategy?
  6. What does the backtest result table show?
  7. Where do ATR trailing stops hurt: whipsaw in ranges?
  8. How do you size futures positions with an ATR stop?
  9. What can an ATR stop not tell you?
  10. Frequently asked questions
  11. References

An ATR trailing stop follows the highest price since entry at a distance of a multiplier times the Average True Range, and it never moves against the trade. The rule has two parameters: the ATR period and the multiplier. For index futures, start with 14 bars and 2 to 3 ATR, then test a coarse grid with costs included.

How does an ATR trailing stop work?

The whole rule has two parameters, the ATR period and the multiplier, because the stop is computed from only three values: the highest price since entry, the ATR of the last completed bar and the multiplier. An ATR trailing stop is a stop order whose level sits a fixed number of ATRs below the highest high since the trade was opened (for a long trade) and only rises, never falls. For a short trade, it sits the same distance above the lowest low since entry and only falls. Some traders call this a chandelier exit, because the stop hangs from the top of the move.

Think of a ratchet on a hand winch. Each turn pulls the rope tighter, and the pawl stops it from slipping back. Each new high pulls the stop up, and the rule stops it from slipping down during a pullback. The trade ends when a bar closes below the current stop level (or the price trades through it, depending on how you write the exit).

For a long trade on each completed bar, the rule runs in this order:

  1. Record the highest high since entry, including the bar that just closed.
  2. Read the ATR of the bar that just closed. The current bar's ATR is not known yet.
  3. Compute the candidate stop: highest high minus multiplier times ATR.
  4. If the candidate is higher than the current stop, raise the stop. If it is lower, keep the current stop.
  5. Place the stop for the next bar at that level.
An ATR trailing stop follows the highest high since entry at a distance of two ATR from the prior bar. It rises on each new high, stays flat during pullbacks, and the trade exits when price closes below it. The stop only moves up Stop = high − 2 × ATR of prior bar Price Stop Exit 2 × ATR Each new high lifts the stop. So: never use the current bar's ATR.
The trailing stop follows the highest high since entry at a distance of multiplier × ATR and never moves down. The ATR used for each bar's stop comes from the bar before it.

Because ATR changes from bar to bar, the distance between the highest high and the stop also changes. When the market gets wilder, the distance widens, so a pullback of normal size for that market does not hit it. When the market calms down, the distance tightens and the stop protects more of the open profit. That is the one job the stop does, and it does it with two numbers you choose.

What is ATR and why does it adapt to volatility?

ATR adapts to volatility because it is an average of how far each bar actually moved, gaps included, so it grows when bars and gaps get larger and shrinks when the market goes quiet. Average True Range (ATR) is the average of each bar's true range over a chosen number of bars, called the period. J. Welles Wilder, who also created RSI, introduced it. The ATR indicator page holds the full definition and the note on Wilder's smoothing, so this article spends its words on using and testing it.

True range is the largest of three distances for one bar:

  1. The bar's high minus its low.
  2. The distance from the previous close to this bar's high.
  3. The distance from the previous close to this bar's low.

The second and third distances matter when the market gaps. A bar can have a small high-to-low range and still be a large move if it opened far from the previous close. The true range counts that gap as part of the move.

Hypothetical example

The previous bar closed at 100. The next bar opens higher and trades between 101 and 104. High minus low is 3. High minus previous close is 4. Low minus previous close is 1. The true range is 4, the largest of the three, so the gap from 100 to 101 is counted.

True range of a bar that trades from 101 to 104 after a previous close of 100: high minus low is 3, high minus previous close is 4, low minus previous close is 1, so the true range is 4 True range counts the gap Close 100, next bar trades 101–104 104 101 Close 100 High − low = 3 High − close = 4 Low − close = 1 True range = 4, the largest. So: the gap counts as part of the move.
True range counts the gap from the previous close, so a small bar after a gap is still a large move.

Wilder used a smoothed average: each new ATR value keeps most of the old value and adds a small share of the newest true range. Some platforms offer a simple average instead. The two give slightly different numbers, so check which one your platform uses before you compare a backtest with live values. Either way, a run of large bars pushes the average up, and a run of small bars pulls it down. A stop built on ATR inherits that behaviour, which is the whole reason to use it instead of a fixed distance.

Which multiplier and period make sense for index futures?

Start with a 14-bar period and a multiplier between 2 and 3, and change either only when a test gives you a reason. The period decides how fast the stop reacts to a change in volatility. The multiplier decides how much room the trade gets.

PeriodBehaviourTypical use
Short (about 5 to 10 bars)Reacts fast, jumps after one large barExits that should follow sudden changes in volatility
Default (14 bars)Balanced, the most common referenceInitial stops and trailing stops
Long (about 20 to 50 bars)Smooth, slow to changePosition sizing that should not change every day

The period is counted in bars, not in time. A 14-period ATR on 5-minute bars covers 70 minutes. On daily bars it covers about three trading weeks. If you change the bar size, the same period describes a very different stretch of the market, so a multiplier that worked on daily bars says nothing about 5-minute bars until you test it there.

Two data choices change ATR more than most traders expect, and both must be fixed before you measure anything:

  • Sessions. If your chart shows the day session only, the gap from yesterday's close to today's open becomes part of the first bar's true range. The same market on full-session bars spreads that move over the night bars. Day-only data therefore shows a larger ATR at the open and a different trailing-stop distance for the same multiplier. Decide on the session first, then measure ATR.
  • Contract rolls. On an unadjusted continuous futures series, the price jump at a roll looks like a huge true range. That one bar can inflate ATR for weeks and push every trailing stop far away from price. Use a back-adjusted series, or make sure your data handles the roll.

How does an ATR trailing stop compare with a fixed-tick stop?

A fixed-tick stop keeps one distance in every condition, so it is too tight in fast markets and too loose in quiet ones, while an ATR stop keeps the distance in line with current swings. A fixed-tick stop is a stop placed a set number of ticks from the entry or from the highest price, regardless of how the market is moving. The price of the ATR version is that the money at risk per contract changes from trade to trade.

With a multiplier of 2 and an ATR of 15 points, a long position's stop sits 30 points below the highest high since entry. A week later, with ATR at 25 points, the same rule puts the stop 50 points below. A fixed 30-tick stop would still sit 30 ticks away and would be hit by swings that are normal for the faster market.

Fixed-tick stopATR trailing stop
Stop distanceSame number of ticks every tradeChanges with recent volatility
Quiet marketOften wider than neededTightens with the market
Fast marketNormal swings can hit itWidens to stay outside normal swings
Money at risk per contractConstantVaries, so sizing must adjust
Parameters to testTick distanceATR period and multiplier
Illustration of a price line that is quiet and then fast: a fixed-distance stop stays at one level and is hit by a normal swing in the fast stretch, while a stop at 2 ATR widens when the market speeds up and is not hit The fixed stop gets hit Illustration: quiet, then fast market Quiet Fast Hit Price Fixed stop ATR stop ATR stops widen in fast markets. So: pair ATR stops with ATR sizing.
A fixed-tick stop keeps one distance. An ATR stop widens when the market moves more, so normal swings are less likely to hit it.

Three backtest details decide whether an ATR trailing stop in a test behaves like one in a live account:

  • Use the ATR of the last completed bar. The current bar's ATR is not known until the bar closes. Using it for a stop on that same bar lets the test see the future, and the error favours the backtest.
  • Decide whether the distance is frozen or updated. A stop whose distance is fixed at entry and a stop whose distance is recomputed every bar behave differently. The trailing version described here updates the distance on every bar. Write down which one you test, and trade the same rule.
  • Model gaps through the stop. When the market opens beyond your stop, you fill at the open, not at the stop price. A backtest that fills every stop at its exact level is too kind, and the error is largest for tight multipliers and for day-only data with large opening gaps.

How do you test multipliers and periods on the same trend strategy?

Fix one entry rule, run a coarse grid of periods against multipliers with costs and next-bar execution in every run, pick from the middle of a plateau, and confirm the choice in walk-forward windows. A good ATR setting sits on a broad plateau of similar results. A single sharp peak surrounded by weak cells usually means the backtest fitted noise. Think of choosing a place to stand on a hill: a wide flat top is safe, a needle point is not.

  1. Fix the entry rule. Test exits on one entry rule at a time, for example a simple breakout entry, so you know which change caused a result.
  2. Pick a coarse grid. For example, periods of 7, 14, 21 and 28 against multipliers of 1.0, 1.5, 2.0, 2.5, 3.0 and 4.0. That is 24 cells.
  3. Include costs and next-bar execution in every run. Small multipliers create many stop-outs, and each one pays commission and slippage. A grid without costs ranks the tight multipliers too high.
  4. Look at the whole grid. Check whether neighbouring cells give similar net results and drawdowns.
  5. Choose from the middle of a plateau, not the single best cell.
  6. Confirm out of sample. Run a walk-forward analysis and check that each window picks a multiplier from the same region. If one window picks 1.0 and the next picks 4.0, the region is not stable.
Six steps to test an ATR exit: fix the entry, choose a 4 by 6 grid, add costs to every run, find the plateau, pick its middle, confirm with walk-forward; every return to the grid adds variants to count Test exits in a fixed order Every loop back adds variants + variants Fix entry 4 × 6 grid Add costs Find plateau Pick middle Walk-forward Each extra variant inflates the best. So: write down every variant tried.
The order of steps keeps the exit test clean: entry fixed first, costs in every run, plateau chosen, walk-forward last. Every return to the grid adds variants to the count.
Hypothetical grid of net results by ATR period 7, 14, 21 and 28 and stop multiple 1 to 4: a broad plateau of good results covers periods 14 to 28 and multiples 2 to 3, while one isolated bright cell at period 7 and multiple 1 is surrounded by weak cells and is likely luck Pick the plateau, not the peak Illustration: period × ATR multiple 1× 1.5× 2× 2.5× 3× 4× Period 7 14 21 28 Plateau Lucky peak A lone peak is likely luck. So: pick the middle of the plateau.
Hypothetical grid of net results. The broad plateau is a stable choice. The isolated bright cell is more likely luck than an edge.

Every extra setting you try raises the chance that the best one looks good by accident. With 4 periods, 6 stop multipliers and 5 target multipliers you have 120 variants. The best of 120 is inflated, because some variant will fit the past's noise well. Research on backtest overfitting shows that the more configurations you try, the more likely the top result fails on new data (Bailey, Borwein, López de Prado and Zhu, 2014). Keep the grid coarse, write down how many variants you tried, and read overfitting in strategy generation before you widen the search.

MultiAlphas (Valynox) handles this kind of search through strategy generation, where you set parameter ranges, entry and exit conditions and search constraints. MultiAlphas evaluates each candidate with the same fees, slippage and next-bar execution, so the grid compares like with like.

What does the backtest result table show?

A result table across multipliers shows one typical pattern: tight multipliers produce many small stop-outs and heavy cost drag, wide multipliers give back more open profit per trade and exit less often, and the middle region holds the net result and the drawdown together. Read net result, trade count, average trade against the round-trip cost and maximum drawdown side by side, never the net result alone. Each multiplier you run gets its own trades, equity and drawdown in MultiAlphas's performance report, so the stop-out count and maximum drawdown can be read beside the net result.

The table below is a made-up illustration of that pattern, not a measured run. It assumes one micro index future, one fixed breakout entry, a 14-bar ATR period, and a round-trip cost of $3 per contract for commission plus slippage. The numbers are round on purpose.

Hypothetical example

MultiplierTradesCosts paidNet result after costsAverage trade after costsMax drawdown
1.0900$2,700−$1,800−$2$4,500
1.5650$1,950$2,600$4$3,900
2.0480$1,440$6,700$14$3,200
2.5400$1,200$7,200$18$3,000
3.0340$1,020$6,800$20$3,400
4.0260$780$4,400$17$4,600

At a multiplier of 1.0 the strategy trades 900 times and pays $2,700 in costs, more than the gross edge, so the net result is negative. From 2.0 to 3.0 the trade count falls, the average trade is several times the $3 round-trip cost, and the drawdown is the smallest. At 4.0 each trade gives back a large share of its open profit before the stop is hit, and the drawdown rises again even though there are fewer trades.

Hypothetical results for ATR multipliers 1.0 to 4.0: trade count falls from 900 to 260, net result after costs peaks between 2.0 and 3.0, where drawdown is lowest The middle region holds up Hypothetical, 14-bar ATR, $3 per trade × ATR Trades Net Drawdown 1.0 1.5 2.0 2.5 3.0 4.0 900 650 480 400 340 260 2.0–3.0: profit with low drawdown. So: pick the middle, not the peak.
Hypothetical example. Tight multipliers trade often and pay the most in costs; the middle region balances net result and drawdown; wide multipliers give back open profit.

How to read a table like this on your own data:

  • Trade count against costs. Multiply the trade count by your round-trip cost. If that number is close to the gross result, the strategy depends on cheap execution. Doubling the slippage assumption and rerunning the row is a fast check.
  • Average trade against round-trip cost. An average trade of a few multiples of the cost leaves room for slippage to be worse than assumed. An average trade of one cost unit does not.
  • Drawdown next to net result. Two multipliers with similar net results and very different drawdowns are not equal. The lower drawdown is the one you can hold through a bad year.
  • The shape, not the peak. In the example the plateau runs from 2.0 to 3.0. Choosing 2.5 because it is the top cell and choosing 2.5 because it is the middle of the plateau look the same here, but the second reason survives a new year of data better.

A real table from your own history will not be this smooth. Trending years favour wide multipliers; choppy years punish them. That is why the grid is confirmed in walk-forward windows, and why the net result of a single run is a description of the past, not a forecast.

Where do ATR trailing stops hurt: whipsaw in ranges?

In a sideways market the trailing stop ratchets up on each small swing high and gets hit on the next swing down, so the strategy pays entry, stop-out and re-entry costs again and again. A whipsaw is a trade that is stopped out shortly after entry and then followed by a new entry in the same direction, so the account pays two round trips for one idea. The same rule that holds a long trend for weeks loses money in a range, not because the stop is wrong but because the entry keeps firing where there is no trend to follow.

The same 2 ATR trailing stop exits once in a steady uptrend but is stopped out four times in a sideways range of equal length, paying a full round-trip cost each time Ranges whipsaw the same stop Same 2 × ATR trailing stop Trend · 1 exit Range · 4 exits Stop The range pays four round trips. So: filter ranges in the entry.
The same 2 × ATR trailing rule: one exit in the trend on the left, four entries and four stop-outs in the range on the right, each paying a full round-trip cost.

The natural reaction is to widen the multiplier until the range no longer stops the trade out. That is the wrong fix, for two reasons. First, a stop wide enough to survive every range no longer protects anything when the trend does reverse, and the drawdown column shows it. Second, you have now tuned the exit to a problem that belongs to the entry. The range filter belongs in the entry rule, and it should be tested in the same grid, not after it.

Two ways to do that:

  1. Add a trend-strength or range filter to the entry. Only take the breakout entry when the market shows a trend by some separate measure. Test the strategy with and without the filter at the same multipliers, and compare trade count, costs paid and drawdown row by row.
  2. Count the re-entries. Add a column for the number of times the strategy re-entered within a few bars of a stop-out. If that count is high in the years with the worst results, the whipsaw is the problem, and the filter is the test to run next.

Both changes add variants to the count from the previous section. A grid of 24 exit cells with and without a filter is 48 variants, and the best of 48 is inflated like the best of 120 was. Write down the number before you look at the result.

How do you size futures positions with an ATR stop?

Dividing the money you accept to lose by the stop distance in money keeps the risk per trade roughly constant while the stop distance changes with volatility. Volatility-scaled position sizing chooses the number of contracts so that a stop of a fixed number of ATR costs about the same share of the account on every trade. When volatility rises, you trade fewer contracts. When it falls, you trade more.

The calculation has one line:

Contracts = account risk ÷ (multiplier × ATR × point value), rounded down.

  • Account risk is the money you accept to lose on this trade, for example 1% of the account.
  • Multiplier is your ATR stop multiplier, for example 2.
  • ATR is the ATR of the last completed bar, in price points.
  • Point value is the money one full point of price movement is worth for one contract.

The position size calculator does this division for a given account risk and stop distance. The futures contract calculator shows tick size, tick value and point value. Exchanges set these values and can change them, so confirm them on the exchange's contract page.

Hypothetical example

An account of $100,000 risks 1% per trade, which is $1,000. ATR is 20 points and the stop is 2 ATR, so the stop is 40 points away. On a full-size contract worth $50 per point, the stop costs $2,000 per contract. That is more than $1,000, so the result is zero contracts. On a micro contract worth $5 per point, the stop costs $200 per contract, so the account trades 5 contracts.

Later, volatility doubles and ATR is 40 points. The stop is now 80 points, or $400 per micro contract. $1,000 ÷ $400 = 2.5, rounded down to 2 contracts. The actual risk is $800. The position shrank, and the money at risk stayed close to the target.

ATR sizing on a micro contract at 5 dollars per point with a risk budget of one thousand dollars: at ATR 20 the stop is 40 points or 200 dollars, giving 5 contracts and the full budget at risk; at ATR 40 the stop is 80 points or 400 dollars, giving 2.5, rounded down to 2 contracts and 800 dollars of risk ATR doubles, contracts halve Micro, $5/pt, risk: a thousand dollars ATR 20 Stop: 40 pts = $200 Budget ÷ $200 = 5 5 contracts Risk: full budget ATR 40 Stop: 80 pts = $400 Budget ÷ $400 = 2.5 2 contracts Risk: $800 Money at risk stays near budget. So: round down, size at entry.
When ATR doubles, the stop distance doubles and the contract count halves, so money at risk stays near the target.

Practical points for futures:

  • Size with the stop distance at entry. The trailing stop moves later, but the sizing uses the initial distance, because that is the most the trade can lose if nothing else happens first.
  • Always round down. Rounding up means every trade risks more than you planned.
  • A result of zero is information. It means the stop is too wide for the account on that contract. Use a smaller contract, a smaller multiplier, or skip the trade.
  • Check margin after sizing. ATR sizing in a quiet market can suggest more contracts than your margin allows. Margin, not the sizing formula, sets the ceiling.
  • Compare markets in money, not points. ATR times point value gives the money one ATR is worth per contract. That number lets you size an index future and a gold future to similar risk.

What can an ATR stop not tell you?

ATR measures how far the market moves, not which way, so the entry rule, the data cleaning and the direction rule remain separate decisions. Use it to place exits and size positions, not as an entry signal on its own.

  • No direction. ATR rises in a sharp rally and in a sharp sell-off alike. A high ATR says the market is moving a lot, nothing more.
  • No forecast. ATR describes the last N bars. Volatility can jump on the next bar after a news release, and ATR follows only afterwards. The stop set from yesterday's ATR can be too tight for today's open.
  • Lag after spikes. One very large bar can keep a long-period ATR elevated for many bars after the market calms down, and the trailing stop stays too far from price during that time.
  • Price units only. An ATR of 20 points means different things at a price of 500 and a price of 20,000. To compare markets or long periods, divide ATR by price to get ATR as a percentage.
  • Data artefacts. Bad ticks, missing bars and roll gaps all enter the true range and move the stop. Clean data comes first.

What this means if you use MultiAlphas: set the ATR period and multiplier as parameter ranges on one fixed entry rule, let every cell run with the same costs and next-bar execution, and keep only settings that hold up across a broad region of the grid and in walk-forward windows.

Frequently asked questions

What is a good ATR multiplier for a trailing stop?

Many traders start between 2 and 3 ATR on index futures, but no multiplier is right for every market and bar size. Test a coarse range on your own strategy with costs included. Choose a value from a stable region where neighbouring multipliers give similar net results and drawdowns.

What is the best ATR period setting?

The common default is 14 bars, the setting Wilder used. Shorter periods react faster but jump after single large bars. Longer periods are smoother but slower to tighten after a volatile stretch. Remember that the period counts bars, so 14 on a 5-minute chart is a much shorter time span than 14 on a daily chart.

Does an ATR trailing stop move down?

No. For a long trade the stop only rises, because it is anchored to the highest high since entry and the rule keeps the higher of the old stop and the new candidate. If ATR grows during a pullback, the candidate stop falls, but the placed stop stays where it was. For a short trade the same logic applies in the other direction.

Should the ATR stop use the current bar or the last completed bar?

Use the last completed bar. The current bar's high, low and close are not known until it closes, so its ATR is not known either. A backtest that uses the current bar's ATR for the current bar's stop is looking ahead, and the result is more favourable than anything a live account could achieve.

Why does my ATR value differ between platforms?

Platforms can use different averaging methods, such as Wilder's smoothing or a simple average. Session settings and how the data handles contract rolls also change the true range. Use the same method and the same data in the backtest and in live trading.

References

  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.