Get 20% off all challenges

Supertrend Indicator: Formula, Settings and How to Trade It

Supertrend indicator explained: the ATR band formula with a worked example, the default 10 and 3 settings, a Pine Script snippet and 3 trading setups.

Gianluca Pizzituti••14 min read
Share article
Supertrend Indicator: Formula, Settings and How to Trade It

One account, every market we offer

Explore all markets

The Supertrend indicator is a trend-following overlay that draws one line on the price chart: green and below price when the trend is up, red and above price when the trend is down. The line sits a multiple of the Average True Range away from price, so it widens in volatile markets and tightens in quiet ones. When a bar closes on the other side of the line, the colour flips.

That single line does 3 jobs. It names the trend, it gives a trailing stop level, and its flips give entry and exit signals. In a sideways market it flips again and again. This guide covers the calculation with real numbers, the default 10 and 3 settings, a short Pine Script example, 3 trading setups and the limits. For the wider toolkit, see our guide to technical indicators.

Quick answer: The Supertrend indicator, credited to Olivier Seban, plots a band at the bar midpoint plus or minus a factor times ATR. The common default is a 10-period ATR and a factor of 3. In an uptrend it shows the lower band, which can only rise. A close below that band flips the trend down, and the upper band, which can only fall, takes over.

Highlights of this article

  • Supertrend is built from 2 inputs only: an ATR length and a multiplier, usually 10 and 3
  • The bands start from the bar midpoint, (high + low) / 2, plus or minus the multiplier times ATR
  • The active band moves only in the direction of the trend, which is what makes it a trailing stop
  • A flip needs a bar to close beyond the line, so signals are confirmed at the close and arrive after the move has started
  • It performs in trending markets and loses repeatedly in ranges, so most setups add a trend or volatility filter

What is the Supertrend indicator?

Supertrend is a volatility-based trend line. It belongs to the same family as ATR trailing stops and Parabolic SAR: tools that sit on one side of price, follow it, and switch sides when price breaks through.

The TradingView Help Center credits the indicator to Olivier Seban, a French trader and author.

The building block is the Average True Range. ATR measures how far a market typically moves per bar, including gaps. If you have not used it before, read the ATR indicator guide first, because every Supertrend value is an ATR value with a multiplier applied.

Item Detail
Indicator type Trend-following overlay, volatility based
Credited to Olivier Seban
Inputs ATR length and factor (multiplier)
Common default ATR length 10, factor 3
Line below price Uptrend, acts as a rising stop
Line above price Downtrend, acts as a falling stop
Flip rule A bar closes beyond the active line

How is the Supertrend indicator calculated?

The calculation runs in 3 stages: basic bands, final bands and trend direction.

Stage 1: basic bands

Basic upper band = (high + low) / 2 + factor x ATR

Basic lower band = (high + low) / 2 - factor x ATR

The term (high + low) / 2 is the bar midpoint, often written hl2. Both the TradingView Help Center and the cTrader documentation give this band formula.

Stage 2: final bands

The basic bands jump around with every bar. The final bands add a ratchet:

  • The final lower band takes the new basic lower band only if it is higher than the previous final lower band, or if the previous close was below the previous final lower band. Otherwise it keeps its old value.
  • The final upper band takes the new basic upper band only if it is lower than the previous final upper band, or if the previous close was above the previous final upper band. Otherwise it keeps its old value.

So in an uptrend the lower band can rise or stay flat. It cannot fall.

Stage 3: trend direction

If the trend is up, it stays up until a bar closes below the final lower band. Then the trend turns down and the indicator plots the upper band. If the trend is down, it stays down until a bar closes above the final upper band.

A worked calculation

Use a 10-period ATR and a factor of 3. The trend is already up.

Bar High Low Close hl2 ATR Basic lower band Final lower band
A 104 100 103 102.0 2.00 96.00 96.00
B 106 103 105 104.5 2.10 98.20 98.20
C 105 101 102 103.0 2.20 96.40 98.20

Bar A: 102 - 3 x 2.00 = 96.00. Bar B: 104.5 - 3 x 2.10 = 98.20, which is higher than 96.00, so the line steps up. Bar C: 103 - 3 x 2.20 = 96.40, which is lower than 98.20, so the line stays at 98.20.

On bar C price fell and volatility rose, yet the stop did not move away. From here, a close below 98.20 would flip Supertrend to a downtrend, and the red line would appear above price at that bar's basic upper band.

The same thing in Pine Script

TradingView has a built-in function, so a working version takes a few lines:

//@version=6
indicator("Supertrend example", overlay = true)
[st, dir] = ta.supertrend(3, 10)
plot(dir < 0 ? st : na, "Uptrend", color = color.green, style = plot.style_linebr)
plot(dir > 0 ? st : na, "Downtrend", color = color.red, style = plot.style_linebr)

The first argument is the factor and the second is the ATR length. The direction value is negative in an uptrend and positive in a downtrend. Our Pine Script guide explains how to turn a study like this into a strategy you can test.

A dark screen showing a cryptocurrency chart with candles, volume and data panels
Supertrend plots directly on the price chart, so it needs no separate panel.

What are the best Supertrend settings?

The common default is an ATR length of 10 and a factor of 3. The 2 inputs do different things, so change them one at a time.

Change What happens Trade-off
Lower factor (for example 2) Line sits closer to price, flips sooner Earlier entries and exits, more false flips
Higher factor (for example 4) Line sits further away, flips rarely Rides long trends, gives back more at the end
Shorter ATR length (for example 7) ATR reacts faster to recent bars Line distance changes quickly after a spike
Longer ATR length (for example 14 or 20) ATR is smoother Line distance is steadier, slower to adapt

The factor has the larger effect. Moving from 3 to 2 cuts the ATR offset by a third on every bar.

When to move away from 10 and 3:

  • Lower timeframes with a lot of noise: keep the factor at 3 or raise it. A factor of 1 or 1.5 on a 1-minute chart flips constantly.
  • Markets with strong, clean trends: a factor of 2 gets you in and out earlier without too many extra flips.
  • Long holding periods: a factor of 4 on a daily chart keeps you in through deeper pullbacks.

Do not tune the settings until the chart looks perfect in hindsight. That is curve fitting. Pick 2 or 3 candidates and compare them with backtesting over a period that includes both trends and ranges.

How do you read the Supertrend indicator?

  • Colour and side: a green line under price means uptrend. A red line over price means downtrend.
  • Flip: the bar where the colour changes is the signal bar. The signal is only final when that bar closes.
  • Flat stretches: a line that goes flat for many bars means price has stopped making progress. The trend is pausing, and a flip becomes more likely.
  • Flip frequency: 3 or more flips in a short stretch tell you the market is ranging. The right response is to stand aside or switch to a higher timeframe.

3 Supertrend trading strategies

Setup 1: flips filtered by a long moving average

  • Filter: only take long flips when price is above the 200-period average, and short flips when it is below. See moving averages for how to pick the type and length.
  • Entry: Supertrend turns green while the filter points up. Enter on the close of the flip bar.
  • Stop: just beyond the Supertrend line. If that is more than you want to risk, reduce the position size, do not move the stop closer.
  • Exit: Supertrend turns red. Ignore the short signal if the filter still points up.

This is a simple trend following system. It often has more losing trades than winning ones. It relies on a few long trends to cover the small losses.

Setup 2: pullbacks to the line

A flip entry often comes late, with a wide stop. This setup waits for a better price.

  • Condition: Supertrend has been green for a while and price has made at least one higher high since the flip.
  • Entry: price pulls back to within about 1 ATR of the line, then prints a bar that closes back up. Enter on that close.
  • Stop: below the Supertrend line with a small buffer.
  • Exit: take part at the previous high and hold the rest until the line flips.

If the pullback closes through the line, there is no trade.

Setup 3: two Supertrends, slow and fast

Put 2 copies on the chart: a slow one at 10 and 3, and a fast one at 10 and 2.

  • Direction: the slow line sets the bias. Trade long only while it is green.
  • Entry: the fast line flips green while the slow line is already green. This often follows a pullback, or a fresh move of the kind breakout trading looks for.
  • Stop: the fast line.
  • Exit: the fast line flips red. Re-enter if it turns green again while the slow line has stayed green. Close everything if the slow line flips.

Several charts on a laptop screen seen at an angle
Checking Supertrend on 2 timeframes helps separate a pullback from a real change of trend.

What are the limits of the Supertrend indicator?

  1. Ranges. In a sideways market the line flips back and forth, and each flip is a loss of roughly the distance between the bands. The TradingView Help Center states plainly that the indicator generates false signals at times and should be combined with other tools.
  2. Lag. A flip needs a close beyond a line that sits about 3 ATR from the midpoint. By the time it prints, a good part of the move is already gone.
  3. Wide initial stops. Right after a flip, the new line is a full band width away. That forces a small position or a large risk.
  4. Close-based flips. The line can be pierced during a bar and still hold if the bar closes back inside. A stop order resting at the line would be filled, while the indicator shows no flip. Decide in advance whether your stop-loss is a hard order at the line or a rule based on the close.
  5. No strength reading. Green tells you the direction. It does not say whether the trend is strong or about to stall.

A ranging market can produce several small losses in a row, so plan for that streak in advance.

Supertrend vs Parabolic SAR vs moving averages

Question Supertrend Parabolic SAR Moving average
What sets the distance to price? ATR times a factor An acceleration factor that grows over time The average of past prices
Does it adapt to volatility? Yes, directly Only indirectly No
Does it tighten as the trend ages? No Yes No
What triggers a flip? A close beyond the line Price touching the dot Price or another average crossing it
Inputs ATR length, factor Start, step, maximum Length, type
Handles deep pullbacks Well, with factor 3 or more Poorly late in a trend Depends on length
Weakest in Ranges Ranges Ranges, fast reversals

The closest alternative is Parabolic SAR. Both flip between a level under price and a level over price. Parabolic SAR tightens with every bar, so it exits steep moves quickly and gets shaken out of slow trends. Supertrend keeps its distance until price or ATR moves, so it sits through slow trends and gives back more when a steep move reverses.

Using Supertrend in a prop firm challenge

Supertrend suits a rule-based approach, and a prop firm challenge rewards exactly that. Velotrade runs simulated, educational evaluations on DXtrade with crypto, forex, stocks, index ETFs and commodities, so you can apply one set of Supertrend rules to several markets and trade only the ones that are trending.

Three points to plan for:

  • The maximum drawdown is static. The floor is set from the starting balance and does not move. A whipsaw streak takes a fixed bite out of it, so keep risk per trade small enough to survive several flips in a row. See static maximum drawdown explained.
  • Size from the line. Risk per trade divided by the distance to the Supertrend line gives the position size. After a flip that distance is large, so the size must be small.
  • Cap the flips. A personal rule such as 2 losing flips on one market per day keeps a ranging session away from the daily loss limit.

Funded traders keep an 80% profit split. Plans and rules are on the challenges page.

Sources

Frequently Asked Questions

About the author

Gianluca Pizzituti

Gianluca Pizzituti

Chief Executive Officer

Formerly on the derivatives desk at Dresdner Kleinwort in London, then founded and ran a proprietary HFT firm in FX and equity indices out of Singapore.

Velotrade was founded in Hong Kong in 2016 by a team from JP Morgan, Dresdner Kleinwort and Bank of America, has facilitated over $2.5 billion in trade-finance payments, and has been featured in Bloomberg, the Financial Times, the Wall Street Journal and on Nasdaq. Its prop trading evaluations are simulated and educational.

View author page

Ready to trade with
$200,000 capital?

Up to 90% profit split

Keep most of what you earn

No consistency rule

News trading allowed

Payouts within 24 hours

Once approved