What it measures
Supertrend, popularized by Olivier Seban, is a trend-following line built from the average true range (ATR). Around the bar midpoint (high + low) / 2 it places two bands factor × ATR(period) away.
- Bands ratchet while price respects them. The lower band only moves up while the previous close stayed above it; once a close breaks below it, the band resets to its current raw level. The upper band mirrors this.
- The line follows the trend. In an uptrend it shows the lower band, in a downtrend the upper band.
- Flips use the prior band. The trend turns down when the close falls below the previous bar's lower band, and turns up when it rises above the previous bar's upper band.
Because of the reset rule, the line can occasionally step down during an uptrend (for example after a very wide bar), so treat it as a trailing reference rather than a line that only ever rises.
| Output | Meaning |
|---|---|
value | The Supertrend line (the active band) |
direction | 1 while the trend is up, -1 while it is down |
On the chart the line is green below price while rising, red above price while falling, with the area to price shaded and Up/Down markers where it flips.
How to read it
- As a trailing stop. Many traders hold a long position while price stays above the green line and treat a close below it as the exit.
- As a trend filter. Take long setups only while
directionis1, short setups only while it is-1. - At a flip. A flip is a possible entry or exit signal; it is most reliable when it agrees with the broader trend.
Tuning
factor scales the distance directly: a larger factor puts the bands further from price, which tends to mean fewer flips and later signals; a smaller one reacts faster but flips more on noise. period changes how the ATR is smoothed rather than simply widening the bands: a longer period responds more slowly to changes in volatility, so after a volatility spike it can even produce narrower bands than a short one. The defaults of 10 and 3 are a common starting point for daily charts.
Common mistakes
- Using it in sideways markets. Supertrend flips repeatedly when price chops inside a range, and each flip can be a losing trade.
- Treating the line as a price target. It is a trailing reference level, not a forecast.
Scans and alerts
Supertrend carries its trend state from bar to bar (accumulate in its source), which chart indicators support but scan and alert formulas do not yet. Use it on charts; for a scan, a close above a rising ATR-based band is a common approximation.
Inputs
| Input | Type | Default | Range |
|---|---|---|---|
period | integer | 10 | 1 – 300 |
factor | number | 3 | 0.1 – 100 |
Outputs
value, direction
References
- Olivier Seban, Supertrend published formula
