How is the Supertrend calculated?

The Supertrend, created by French trader Olivier Seban, starts from the middle of each candle, (high + low) ÷ 2. It adds a multiple of the ATR to get an upper band and subtracts it to get a lower band. Hypothetical: a candle with a high of $52 and a low of $50 has a midpoint of $51. With an ATR of $1.00 and a factor of 3, the upper band is $54.00 and the lower band $48.00.

In an uptrend the line is the lower band, and it works like a ratchet: it can rise or stay flat, but it does not move down while the trend lasts. When a pullback would pull the band lower, the line simply holds, as the right side of the drawing below shows. In a downtrend the line is the upper band, which can only fall or stay flat. That ratchet is what makes it a trailing stop.

Turn your phone sideways to read the drawing. Tap to close.

Two hand-drawn panels. Left: one candle with a dot at its midpoint, (H+L)/2, and arrows up to a red upper band (+3×ATR) and down to a green lower band (−3×ATR). Right: rising candles with a pullback; a dotted grey line (the raw lower band) dips during the pullback while the green Supertrend line stays flat, then steps up again, with a highlighted note: the line holds instead of dropping.

What are the best Supertrend settings?

TradingView’s built-in Supertrend uses an ATR length of 10 and a factor of 3 by default. The factor sets the distance: with an ATR of $1.00, a factor of 3 puts the band $3.00 from the candle’s midpoint and a factor of 2 puts it $2.00 away. A larger factor gives fewer flips, later exits and bigger losses when a flip goes wrong; a smaller one hugs price, exits sooner and flips more often.

The ATR length sets how many candles the volatility is averaged over; a longer length makes the distance steadier. There is no best setting: the same 10 and 3 behave differently on a 5-minute and a daily chart, so test any change on your own instruments first. To add it, open Indicators on TradingView and search for Supertrend.

How does the Supertrend flip? Buy and sell signals

A flip happens when a candle closes on the other side of the line. In the drawing at the top of this page, the first flip comes when a candle closes above the red line: the line jumps below price and turns green. Later a candle closes below the green line and it flips back to red above price. Traders read a flip to green as a buy signal and a flip to red as a sell signal.

Two details matter. TradingView’s version uses the close, so a wick through the line does not flip it. And on a candle that is still open, the line can flip and flip back before the close, so judge flips on closed candles only; closed candles keep their values, so this is not repainting of history. A flip is also late by design: it comes after price has moved roughly the factor times the ATR from its top or bottom.

How to use the Supertrend as a trailing stop and trend filter

As a trend filter, the color decides which side you trade: longs only while the line is green, shorts or nothing while it is red. Your entries still come from somewhere else, for example a pullback to support; the Supertrend only says which direction to look in. Trend following works the same way on a bigger scale.

As a trailing stop, the line tells you where to get out. Hypothetical: you buy at $50.00 with the green line at $47.00, risking $3.00 a share. The trend runs to $60.00 and the line ratchets up to $56.50. A daily close below $56.50 ends the trade about $6.50 a share above the entry, before costs. Decide in advance whether you exit on a close below the line or with a stop order just under it: the stop order acts during the day but can be hit by a wick, and a gap can fill it well below the line. The stop loss and take profit guide compares the options.

The Parabolic SAR is a close cousin that speeds up toward price as the trend extends instead of keeping an ATR distance.

Why does the Supertrend whipsaw in sideways markets?

Because every flip comes late. In a range, price turns before the line does, so the flip to green arrives near the top of the range and the flip to red near the bottom. The drawing below shows the default (10, 3) line computed on a hypothetical range: each up flip buys in the upper half and each down flip sells in the lower half.

Hypothetical: a stock chops between about $47 and $53. The line flips to green at $52.70 and back to red at $48.20, a $4.50 loss per share. Three such round trips add up fast, before costs. A larger factor flips less but loses more each time. The fix is usually not a setting but a filter that tells you whether the market is trending at all.

Turn your phone sideways to read the drawing. Tap to close.

A hand-drawn sideways market between dashed lines marked range top and range bottom, with a Supertrend line that flips again and again: green triangles where it turns green near the top of the range and red triangles where it turns red near the bottom, under a highlighted note: every flip comes late: buy high, sell low.

How to combine the Supertrend with the ADX

The ADX measures trend strength, not direction, which is exactly what the Supertrend lacks. A common rule: act on Supertrend flips only while the ADX is above about 20 to 25 and rising, and ignore them while the ADX is low and flat. Those levels are conventions, not laws.

The drawing below shows the idea. On the left, price ranges, the ADX stays low and the flips, crossed out, would have been whipsaws. On the right, a trend starts, the ADX climbs above 25 and the flip to green holds. The ADX lags too, so it confirms a trend after it has begun: it reduces whipsaws but does not remove them. Checking the higher timeframe’s direction, as in multi-timeframe analysis, is another filter.

Turn your phone sideways to read the drawing. Tap to close.

Two hand-drawn panels on one time axis. Top: candles with a Supertrend line; left of a dashed vertical line, price moves sideways and the flips are marked with red crosses; right of it, price trends up and a green triangle marks a flip that holds. Bottom: the ADX in purple with a dashed line at 25, low and flat on the left (ADX low: skip the flips) and rising above 25 on the right (ADX rising above 25: follow the line).