GlossarySupertrend 10 · 3

Supertrend 10 · 3

Supertrend is a trend line set at a multiple of the Average True Range. In an uptrend it runs turquoise below the price, in a downtrend red above it. It only trails in the direction of the trend and thus works like a trailing stop: if the price closes on its other side, it switches sides and the trend counts as turned.

Calculation

HtH_t, LtL_t and CtC_t are the high, low and close of a candle, mm is the ATR length, kk the Factor.

1. Midpoint and ATR. The bands hang on the midpoint of the candle. The ATR is the Wilder-smoothed True Range, its starting value the mean of the first mm True Ranges:

Mt=Ht+Lt2,ATRt=(m−1) ATRt−1+TRtmM_t = \frac{H_t + L_t}{2}, \qquad \mathrm{ATR}_t = \frac{(m-1)\,\mathrm{ATR}_{t-1} + \mathrm{TR}_t}{m}

with TRt=max⁡(Ht−Lt, ∣Ht−Ct−1∣, ∣Lt−Ct−1∣)\mathrm{TR}_t = \max\left(H_t - L_t,\ \lvert H_t - C_{t-1} \rvert,\ \lvert L_t - C_{t-1} \rvert\right).

2. Basic bands:

OBt∗=Mt+k⋅ATRt,UBt∗=Mt−k⋅ATRt\mathrm{OB}^{*}_t = M_t + k \cdot \mathrm{ATR}_t, \qquad \mathrm{UB}^{*}_t = M_t - k \cdot \mathrm{ATR}_t

3. Ratchet. The bands may only move in one direction as long as the price stays on their side. The lower band can only rise as long as the previous close was above it, the upper band can only fall as long as the previous close was below it:

UBt={max⁡(UBt∗, UBt−1)if Ct−1>UBt−1UBt∗otherwise\mathrm{UB}_t = \begin{cases} \max\left(\mathrm{UB}^{*}_t,\ \mathrm{UB}_{t-1}\right) & \text{if } C_{t-1} > \mathrm{UB}_{t-1} \\ \mathrm{UB}^{*}_t & \text{otherwise} \end{cases}
OBt={min⁡(OBt∗, OBt−1)if Ct−1<OBt−1OBt∗otherwise\mathrm{OB}_t = \begin{cases} \min\left(\mathrm{OB}^{*}_t,\ \mathrm{OB}_{t-1}\right) & \text{if } C_{t-1} < \mathrm{OB}_{t-1} \\ \mathrm{OB}^{*}_t & \text{otherwise} \end{cases}

Without this lock, the stop would loosen again on a quiet candle just because the ATR got smaller.

4. Trend change. The current close is compared with the bands of the previous candle:

dt={+1if Ct>OBt−1−1if Ct<UBt−1dt−1otherwised_t = \begin{cases} +1 & \text{if } C_t > \mathrm{OB}_{t-1} \\ -1 & \text{if } C_t < \mathrm{UB}_{t-1} \\ d_{t-1} & \text{otherwise} \end{cases}

The first condition is checked first. At the start, on the first candle with an ATR, the trend counts as upward.

5. Drawn line:

STt={UBtif dt=+1OBtif dt=−1\mathrm{ST}_t = \begin{cases} \mathrm{UB}_t & \text{if } d_t = +1 \\ \mathrm{OB}_t & \text{if } d_t = -1 \end{cases}

Both bands are carried forward on every candle; only the one matching the current direction is drawn. At a change, the line pauses for one candle: there the stop jumps from one side of the price to the other.

How to read it

  • Direction: Turquoise below the price means uptrend, red above the price means downtrend.
  • Signal: The color change is the signal. It only occurs when a close breaks through the previous candle's line, not through a wick.
  • Stop: Many traders use the line directly as a trailing stop. In an uptrend it rises or stays flat, in a downtrend it falls or stays flat.
  • Distance: A large distance between price and line means the price has run far. A pullback then has to go far to turn the trend.

Settings

SettingDefaultEffect
ATR length10Length mm of the ATR (1–100).
Factor3Multiple kk of the ATR as the distance (0.5–10, in steps of 0.5). Smaller means tighter and more changes, larger means wider and fewer, but later, changes.

Limitations

  • In sideways phases, Supertrend often flips back and forth, and each change comes after the price has already moved.
  • It only reacts at the close of the candle. On the current candle, a change can appear and disappear again until it closes.
  • The name in the menu states the default values. The calculation uses your settings.

Related indicators