Supertrend: definition and what the indicator is trying to do
Supertrend is a trend-following technical indicator that draws dynamic upper and lower “bands” around price. The bands are based on a volatility measure (Average True Range, ATR) and a multiplier. When price closes above the relevant band, the indicator is typically interpreted as bullish; when price closes below, it is interpreted as bearish.
Even though the indicator is often described in terms of “trend direction,” it is not a promise about future returns. It is a rule-based calculation that reacts to volatility and price crossings.
How the mechanics work (separating stable rules from variable inputs)
A common Supertrend workflow uses these ingredients:
- ATR (volatility): ATR estimates recent typical price movement range. Higher ATR widens the bands.
- Multiplier (parameter): A chosen factor scales the ATR into band distance.
- Band construction: The indicator computes provisional upper and lower bands, then applies a “carry-forward” rule so bands do not jump in ways that contradict the most recent trend assignment.
- Trend state: A current trend state is updated based on the latest close relative to the bands.
Stable mechanics (what you can verify regardless of market): If you start from explicit OHLC inputs (open, high, low, close) and explicit parameters (period length and multiplier), you can reproduce ATR, the provisional bands, and the band carry-forward rule.
Variable conditions (what changes by market and provider): ATR depends on the chosen ATR period and the exact ATR definition; implementations differ on rounding, the exact carry-forward rule, and how/when the trend state is initialized.
Worked numerical example (fully stated assumptions)
Below is one self-contained numerical scenario. It is intentionally simplified so every calculation step is visible. Assumptions are stated first and used consistently.
Assumptions
- We use ATR period = 3 (so we need three True Range values to compute the first ATR).
- Multiplier = 2.0.
- We focus on computing one step (from the ATR and previous close) and then determining the trend state using a close crossing rule.
- Rounding: keep two decimals at each intermediate step.
- “True Range” for each day is computed as max(high − low, abs(high − prior close), abs(low − prior close)).
- We start with a prior trend state of bullish for the purpose of showing the carry-forward logic.
Input OHLC (invented for demonstration)
Let day 1 prior close be C0 = 100.00.
- Day 1: High H1 = 102.00, Low L1 = 99.50, Close C1 = 101.00
- Day 2: High H2 = 103.00, Low L2 = 100.00, Close C2 = 100.50
- Day 3: High H3 = 101.50, Low L3 = 99.80, Close C3 = 100.20
We will compute ATR at the end of day 3, then compute day 4 bands and trend.
Step 1: Compute True Range (TR)
TR1 = max( (102.00−99.50)=2.50, abs(102.00−100.00)=2.00, abs(99.50−100.00)=0.50 ) = 2.50
TR2 = max( (103.00−100.00)=3.00, abs(103.00−101.00)=2.00, abs(100.00−101.00)=1.00 ) = 3.00
TR3 = max( (101.50−99.80)=1.70, abs(101.50−100.50)=1.00, abs(99.80−100.50)=0.70 ) = 1.70
Step 2: Compute ATR (simple average of 3 TR values)
ATR3 = (TR1 + TR2 + TR3) / 3 = (2.50 + 3.00 + 1.70) / 3 = 7.20 / 3 = 2.40
Step 3: Build bands for day 4
Choose day 4 OHLC:
- Day 4 High H4 = 102.20, Low L4 = 100.30, Close C4 = 101.70
Compute the volatility distance:
- ATR4_distance = ATR3 × Multiplier = 2.40 × 2.0 = 4.80
A simplified band center uses the day 4 midpoint (some implementations use (H+L)/2; others use close—this is one reason implementations differ). Here we define:
- Midpoint4 = (H4 + L4)/2 = (102.20 + 100.30)/2 = 202.50/2 = 101.25
Then provisional bands:
- Provisional UpperBand4 = Midpoint4 + 4.80 = 101.25 + 4.80 = 106.05
- Provisional LowerBand4 = Midpoint4 − 4.80 = 101.25 − 4.80 = 96.45