How it is calculated
The basic bands are the bar's midpoint (high plus low, halved) plus and minus mult times the ATR, Wilder's ATR seeded with the mean of the first length true ranges. The upper band only moves down and the lower only up, unless the previous close broke through. An uptrend turns down when the close falls below the lower band, a downtrend up when it closes above the upper. First value on bar length, counting from 0; direction is +1 up, -1 down.
Reference: Seban (SuperTrend)
How to read it
The line is the stop of the current trend, and a change of side is the signal. In strong trends it keeps a position open; in sideways markets it flips often and each flip costs. A larger multiplier means fewer and later flips.
In a strategy
Trend following on the flip: long when ctx.ind("supertrend", length=10, mult=3.0).direction turns from -1 to 1, with .supertrend as the trailing Stop-Loss.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
ATR lengthlength | Whole number | 10 | min 1, max 5000 |
Multipliermult | Number | 3 | min 0.1, max 20 |
What it draws
| Line | Drawn as |
|---|---|
| SuperTrend | Line |
Used in
No strategy template reads it yet.