SuperTrend
SuperTrend is a trend-following line placed several Average True Ranges (ATR) away from the middle of the bar. In an uptrend it runs below the price and is green, in a downtrend it runs above the price and is red. It is used as a trailing stop and as a direction filter.
The indicator is drawn over the price chart.
How to read it
- Until the trend changes, the line moves only in its direction — toward the price — and never moves back.
- A bar closing beyond the line reverses the trend: the line jumps to the other side of the price and changes color, leaving a gap between the old and the new line.
- Trade with the trend while the price stays on its side of the line.
- A larger Multiplier means fewer reversals and a wider stop; a smaller one means more false reversals in a sideways market.
A reversal on the forming bar may appear and disappear before the bar closes; closed bars do not change.
How it is calculated
- ATR is the Average True Range over ATR period bars smoothed with Wilder’s method (as in ATR).
- Two bands are placed from the middle of the bar — (High + Low) / 2 — up and down by Multiplier × ATR.
- The bands move only toward the price: the lower one can only rise, the upper one can only fall. A band resets when the close broke through it on the previous bar.
- In an uptrend the line is the lower band, in a downtrend the upper band. A close beyond the line changes the trend.
The calculation matches SuperTrend in TradingView. The line appears once ATR period bars are available; the first bar with a value starts with a downtrend, so the very first bars of history depend on this starting direction.
Parameters
| Parameter | Description | Default |
|---|---|---|
| ATR period | The ATR period in bars: the distance of the line from the price is based on it. At least 1. | 10 |
| Multiplier | How many ATRs from the middle of the bar to the line: larger means fewer reversals. At least 0.1. | 3 |
Plots
| Parameter | Description | Default |
|---|---|---|
| Uptrend | The uptrend line — below the price: a close below it reverses the trend down. | Green, solid, width 1 |
| Downtrend | The downtrend line — above the price: a close above it reverses the trend up. | Red, solid, width 1 |
Style
The Uptrend and Downtrend lines have the Plot (show the line), Label (show the last value on the right scale), Color, Width (1–5) and Style (Solid, Dashes, Dots) fields.
How to add an indicator to the chart is described in Adding an indicator; parameters are changed in the indicator manager.