Supertrend settings: what ATR length means, plus 10/3, 7/2 and 14/4
What is ATR length in Supertrend? How ATR Length and Factor set the line's distance, with a worked example of 10/3, 7/2 and 14/4 and how to change them.
ATR length in Supertrend is the number of bars used to average the true range, which is how far price typically travels in one bar. The other setting, the factor, is a multiplier on that average. The Supertrend line sits factor times ATR away from the middle of the bar, so these two numbers decide how far the line stays from price and how often it flips. The default is an ATR length of 10 and a factor of 3, written 10/3. This page explains both numbers with figures, compares 7/2, 10/3 and 14/4, and shows where to change them in SuperCharting.
What ATR length means
True range for a bar is the largest of three things: high minus low, the distance from the previous close up to the high, and the distance from the previous close down to the low. Using the previous close means a gap counts as range. The Average True Range (ATR) smooths that with Wilder's method, where each new bar enters with a weight of 1 divided by the length.
So the ATR length is how long a memory the volatility measure has:
- ATR length 7: the newest bar has a weight of 14.3%. ATR reacts quickly.
- ATR length 10: 10%. The default.
- ATR length 14: 7.1%. ATR changes slowly.
Take a symbol where ATR has sat at 100 points. One wild bar then has a true range of 300. ATR 7 rises to about 129, ATR 10 to 120 and ATR 14 to about 114. The shorter length takes the shock into the line faster.
What the factor does
The factor multiplies the ATR. In SuperCharting's Supertrend the bands are:
- Upper band = (high + low) / 2 + factor x ATR
- Lower band = (high + low) / 2 - factor x ATR
With ATR at 100 points, a factor of 2 puts the bands 200 points from the bar's middle, 3 puts them 300 away and 4 puts them 400 away. The factor is the stronger lever: doubling it doubles the distance, while changing ATR length from 10 to 14 only matters when volatility is shifting.
Because the distance is a multiple of ATR, the same 10/3 works on NSE:NIFTY, EURUSD and BTCUSD without you converting points into dollars, and the line widens on its own when the market gets wilder.
A worked example
Say NSE:BANKNIFTY on 15m with ATR 100 and a factor of 3, so the bands are 300 points each side of the middle of the bar. The line starts in an uptrend:
- Bar 1: middle is 52,000, so the lower band is 51,700. The line plots at 51,700.
- Bar 2: middle is 52,050, so the band is 51,750. The line rises to 51,750.
- Bar 3: middle slips to 52,020 and the band computes to 51,720. A line in an uptrend can only rise or stay flat, so it holds at 51,750.
- Bar 4: the middle is 52,010, so the band computes to 51,710 and the line still holds at 51,750. Price closes at 51,740, below the line. The trend flips to down and the line jumps to the upper band, the middle of that bar plus 300.
Nothing happens on an intrabar poke through the line. The flip needs a close beyond it, and the live bar can change until it closes.
Comparing 10/3, 7/2 and 14/4
With ATR at 100 on all three, and then after the 300-point bar from the earlier example:
| Setting | Distance at ATR 100 | After one 300-point bar | Behaviour |
|---|---|---|---|
| 7 / 2 | 200 points | about 257 points | Hugs price. Flips early, gives back less per trade, flips often in ranges |
| 10 / 3 | 300 points | 360 points | The default. A middle path |
| 14 / 4 | 400 points | about 457 points | Stays far from price. Few flips, stays in long trends, but each exit comes after a bigger move against you |
What you gain on one side you lose on the other. A tight setting gets you out sooner and in again sooner, so choppy stretches cost you many small losses. A wide setting rides trends for longer and may hand back a large part of the move before it flips. Trending markets favour the wide settings and sideways ones favour neither. Past results do not guarantee future results, so treat 7/2 and 14/4 as things to test, not upgrades.
A common middle ground is to keep 10/3 and add a slow filter, such as the 200 EMA described in the Supertrend indicator guide and moving average settings.
How to change the Supertrend settings in SuperCharting
- Open a chart, for example NSE:BANKNIFTY on the 15m interval.
- Click Indicators, type "supertrend" and click Supertrend.
- Hover the legend line and click the gear for Settings.
- On Inputs, set ATR Length (default 10, minimum 1) and Factor (default 3.0, in steps of 0.01).
- On Style, change the Up Trend and Down Trend colours or hide one direction.
- Click Ok. To go back, open Settings, click Defaults and choose Reset settings.
To see all three settings on one chart, save this short script from the Script Editor and add it from My scripts. It draws 7/2, 10/3 and 14/4 with different line weights, and the thin solid line is the tightest and the thick faint line is the widest:
//@version=6
indicator("Supertrend three settings", "ST 3x", overlay = true)
[stA, dirA] = ta.supertrend(2.0, 7)
[stB, dirB] = ta.supertrend(3.0, 10)
[stC, dirC] = ta.supertrend(4.0, 14)
plot(stA, "ST 7 / 2", dirA < 0 ? color.green : color.red, style = plot.style_linebr)
plot(stB, "ST 10 / 3", dirB < 0 ? color.new(color.green, 40) : color.new(color.red, 40), 2, style = plot.style_linebr)
plot(stC, "ST 14 / 4", dirC < 0 ? color.new(color.green, 70) : color.new(color.red, 70), 3, style = plot.style_linebr)
Use bar replay to step through a trending week and a sideways week on the same symbol, and note which lines flipped and when.
Testing the numbers
The Strategies chip has Supertrend strategy with the same ATR Length (10) and Factor (3.0) inputs. Add it to NSE:RELIANCE 1D or XAUUSD 1h, open the Strategy Tester from the legend's More menu and set Commission and Slippage. To compare many pairs at once, use Optimise strategy… from the same menu, as explained in the strategy optimiser guide. Prefer a plateau, where a range of nearby values all give similar results, over a single sharp peak. The backtesting guide covers that and out-of-sample testing.
An indicator alert always runs the script with its default inputs (10 and 3), so settings you change in the dialog do not reach the alert. The Supertrend indicator guide shows a script with your own numbers as defaults.
Frequently asked questions
What is ATR length in Supertrend?
It is the number of bars in the Average True Range that sets the line's distance from price. The default is 10. A shorter length makes the line react faster to changes in volatility, and a longer one makes it steadier.
What is the best Supertrend setting?
There is no best one. 10/3 is the standard, 7/2 is tighter and 14/4 is wider. The right choice depends on the symbol, the timeframe and how much giveback you accept before an exit. Test on several symbols.
What does the factor in Supertrend mean?
It multiplies the ATR to give the distance between the middle of the bar and the line. Factor 3 with ATR 100 places the line 300 points away.
Do Supertrend settings change by timeframe?
The numbers count bars, and ATR scales itself to each timeframe, so the same 10/3 gives wider lines in points on 1D than on 5m. Many traders keep one setting across timeframes and compare results, while some try a wider factor on lower timeframes to reduce noise.