Supertrend

An ATR-based trailing trend line that flips above and below price. Modern, visually clear, with explicit direction outputs ready for strategy logic.

Updated 2026-05-24
9 min read
intermediate

An ATR-based trailing line that plots either above or below price depending on the active trend. When the line is below price, the trend is up. When it flips above, the trend is down. Cleaner visually than older trend-trailing indicators, with explicit direction signals built into the outputs.

Placeholder · Video / Clip

Supertrend(10, 3) on MES 5m — alternating uptrend and downtrend

Author hint: MES 5m, dark theme, ~80-bar window. Supertrend(10, 3) overlaid on price chart — green line below price in uptrend sections, red line above price in downtrend sections. Show one or two clean trend flips. ≤ 10 seconds, no audio. Save to /public/images/guide/indicators/supertrend/chart.mp4.

What it measures

  • Trend direction. Single binary state — uptrend or downtrend. Encoded both visually (line color/position) and as the Direction output (1 or −1).
  • Volatility-adjusted trailing line. The distance between price and the Supertrend line scales with ATR — wider in volatile conditions, tighter in calm.
  • Flip events. The is_flipped output explicitly marks the bar where the trend reverses, ready for entry triggers.

Formula

How AlgoLift computes it

Step 1 — bands:

HL2 = (High + Low) / 2
upper_band = HL2 + (multiplier × ATR(period))
lower_band = HL2 − (multiplier × ATR(period))

Step 2 — trend logic:

  • Start with the bands.
  • If the previous close was above the previous upper band, the trend was already up. Continue tracking the lower band as the trailing line.
  • If the previous close was below the previous lower band, the trend was already down. Continue tracking the upper band.
  • Flip when price closes through the active band.

Step 3 — outputs:

  • Uptrend Line = the lower band when trend is up (else null).
  • Downtrend Line = the upper band when trend is down (else null).
  • Direction = 1 (up) or −1 (down).

The clever part: only ONE of the two output lines is active at a time. This is what makes Supertrend's visual presentation work — there's never both an uptrend and downtrend line visible.

Developed in the early 2000s as an evolution of the older Parabolic SAR concept.

Inputs in AlgoLift

SettingDefaultRangeNotes
ATR Period101–200Lookback for the ATR calculation.
ATR Multiplier3.00.1–20.0How many ATRs the band sits from the midpoint. Higher = less sensitive, fewer flips.

Recommended settings

  • (10, 3.0) — default: Standard. Balanced sensitivity for intraday and swing.
  • (7, 2.0): Faster — more flips, suitable for short-term scalping.
  • (14, 4.0): Slower — fewer flips, for swing strategies on higher timeframes.

The multiplier matters more than the period. Going from 3.0 to 2.0 changes the flip frequency dramatically; going from period 10 to 14 doesn't change as much.

Outputs in AlgoLift

HandleTypePlottedNotes
Uptrend LineNumericAlwaysThe active line when trend is up (null otherwise).
Downtrend LineNumericAlwaysThe active line when trend is down (null otherwise).
DirectionNumericOn select1 = uptrend, −1 = downtrend. The cleanest binary trend flag.
Is FlippedNumericOn select1 on the bar where the trend just flipped, 0 otherwise. Use for entry triggers.
Upper Band (Raw)NumericOn selectThe pre-trend-logic upper calculation.
Lower Band (Raw)NumericOn selectThe pre-trend-logic lower calculation.
Placeholder · Screenshot

Supertrend node — default state with all six outputs

Author hint: The Supertrend node on a fresh canvas with default settings (Period=10, Multiplier=3.0). All six output handles labeled. Dark theme. Tight crop. Save to /public/images/guide/indicators/supertrend/node.png.

Reading the components together

The visual line + the Direction output gives you everything in a glance:

  • Green line below price (Uptrend Line active): Buy bias.
  • Red line above price (Downtrend Line active): Sell bias.
  • Is Flipped = 1: Trend just changed this bar. Often used as an entry trigger.
  • Direction × position size: The Direction output can be multiplied directly with a base position size for a "always-in-the-direction-of-Supertrend" strategy.
Key Takeaway

Supertrend is the most strategy-ready trend indicator in the library. The Direction output (1 or −1) and Is Flipped (1 or 0) are designed specifically for wiring into entry logic — no smoothing, no thresholds, no judgment calls about what "trending" means.

Best in / worst in

Best in trending markets with clear directional runs, on instruments with reasonable volatility (most futures, major equity indices). Excellent for "always in the market in the trend direction" strategies.

Worst in sideways chop where Supertrend whipsaws (flips) every few bars. Also weak around news events where a single large bar can trigger a premature flip.

Three setups

1. Always-in-trend strategy

The textbook Supertrend pattern — always hold a position in the indicator's current direction.

  • Long entry / short exit: Is Flipped = 1 AND Direction = 1.
  • Short entry / long exit: Is Flipped = 1 AND Direction = −1.

Combined with size = base × Direction, the strategy holds a flat-then-long-then-short sequence aligned with each flip.

Placeholder · Screenshot

Always-in-trend Supertrend strategy

Author hint: Node graph showing Supertrend Is Flipped output and Direction output feeding into Entry nodes — long Entry triggered when both Is Flipped=1 and Direction=1; short Entry when Is Flipped=1 and Direction=-1. Save to /public/images/guide/indicators/supertrend/setup-01.png.

2. Supertrend as a trend filter

Use Supertrend Direction as a regime gate for any other strategy.

  • Long-only mode: Supertrend Direction = 1 — other strategies (RSI mean-reversion, Bollinger pullback, etc.) only take long entries.
  • Short-only mode: Supertrend Direction = −1 — other strategies take short entries only.

A clean no-tuning regime classifier.

3. Supertrend pullback to the line

Wait for a pullback to the Supertrend line in an established trend.

  • Long: Direction = 1 AND price touches within 0.5× ATR of the Uptrend Line AND price closes back above the line.
  • Short: Symmetric.

The pullback pattern improves R:R compared to flip-entry, at the cost of fewer signals.

Advanced patterns in AlgoLift

Supertrend as the trailing stop for unrelated strategies. Use the active Supertrend line (Uptrend Line for long positions, Downtrend Line for shorts) directly as the trailing stop level. The ATR-based scaling means the stop adapts to volatility automatically. Wire via Set Stop Loss.

Supertrend exit + ATR re-entry combo. Exit positions on Supertrend flip. Re-enter on the next signal from a different system (RSI, MACD) only if Supertrend has flipped back to your direction since exit. Filters out re-entries during prolonged counter-trends.

Multi-Supertrend confluence. Run two Supertrend instances at different multipliers (e.g., 3.0 and 5.0) as separate nodes. Trade only when both agree on direction. The slower one filters out the faster one's whipsaws.

Supertrend Direction in a Conditional Flow. Route the strategy between two different entry logics based on Supertrend Direction. When Direction = 1, run a long-bias pullback strategy; when Direction = −1, run a short-bias breakdown strategy. Single graph handles both regimes.

Placeholder · Screenshot

Supertrend Direction as a strategy-routing flag

Author hint: Node graph showing Supertrend Direction driving a Conditional Flow node that switches between long-bias and short-bias sub-strategies. Save to /public/images/guide/indicators/supertrend/setup-02.png.

Common mistakes

  • Trading every flip without context. Flips in chop produce continuous whipsaw losses. Always combine with a longer-period regime filter (SMA(200), ADX, KAMA).
  • Setting the multiplier too low to "catch more signals." Lower multiplier = more flips = more losses in chop. Multiplier 2.0 vs 3.0 doesn't just change signal count — it dramatically changes the strategy's loss profile.
  • Using Supertrend on too-short timeframes. The ATR-based bands need enough bar movement to be meaningful. Below 5-minute bars, the indicator becomes noise.
  • Ignoring the Is Flipped output. Many users only read the visual line. Is Flipped = 1 is the explicit "trend just changed" signal — designed exactly for entry triggers.
Common Misconception
Myth
Supertrend is just a better Parabolic SAR.
Reality
They solve different problems. Parabolic SAR's stop tightens aggressively as a trend extends, designed to lock in profits. Supertrend's line scales with current ATR, designed to allow normal volatility without flipping. Use SAR when you want fast profit-locking exits; use Supertrend when you want regime persistence with volatility tolerance.