Supertrend Indicator Explained
Supertrend is a trend-following indicator that plots a single line on the chart. The line is green and below price when the trend is up, red and above price when the trend is down. It flips on a close beyond an ATR-based threshold. Popular because it's simple, visual, and directly tradeable: long when green, short when red.
How it works
Supertrend is built from ATR. The formula, simplified:
upperBand = (high + low) / 2 + multiplier × ATR(length)
lowerBand = (high + low) / 2 − multiplier × ATR(length)
The indicator then tracks which band price is on:
- If close > upperBand of the prior bar → trend flips up → Supertrend = lowerBand
- If close < lowerBand of the prior bar → trend flips down → Supertrend = upperBand
- Otherwise, Supertrend holds and "trails" behind price
Defaults: ATR length 10, multiplier 3.0.
A smaller multiplier (2.0) = tighter stops, more flips. Larger (4.0) = looser stops, fewer flips but more room for price to swing.
Why traders love it
- One line, one color, one decision. Flat traders hate ambiguity. Supertrend gives a single clear state.
- Self-adjusting stops. ATR scaling means the trailing line tightens in calm markets and widens in volatile ones.
- Works across instruments. Same defaults behave reasonably on ES, NQ, CL, GC, and crypto — no tuning per-market.
Why it fails
- Whipsaws in chop. Every flip in a range costs you the ATR-multiple distance. In choppy weeks, Supertrend bleeds.
- Late entries. The flip requires a close beyond the band — by which point price has already moved a good chunk of ATR.
- Standalone systems underperform. A pure "buy green, sell red" Supertrend system is profitable but rarely great. It needs a filter.
Supertrend in Pine Script (v6)
//@version=6
indicator("Supertrend Alerts", overlay=true)
atrLen = input.int(10, "ATR Length")
mult = input.float(3.0, "Multiplier")
[stLine, stDir] = ta.supertrend(mult, atrLen)
plot(stDir == -1 ? stLine : na, color=color.green, linewidth=2, title="Supertrend Up", style=plot.style_linebr)
plot(stDir == 1 ? stLine : na, color=color.red, linewidth=2, title="Supertrend Down", style=plot.style_linebr)
// Direction-flip alerts
flipLong = stDir == -1 and stDir[1] == 1
flipShort = stDir == 1 and stDir[1] == -1
if flipLong
alert("Supertrend flipped bullish on " + syminfo.ticker, alert.freq_once_per_bar_close)
if flipShort
alert("Supertrend flipped bearish on " + syminfo.ticker, alert.freq_once_per_bar_close)
Making Supertrend tradeable
Three ways to improve standalone Supertrend:
1. Add a higher-timeframe trend filter. Only take longs if the daily Supertrend is green. Only take shorts if the daily Supertrend is red. Cuts signal count by half and win rate rises.
2. Add an ADX filter. Skip Supertrend flips when ADX < 20. In chop, every flip loses.
3. Use Supertrend as a trailing stop, not an entry. Enter on another signal (breakout, VWAP bounce). Use Supertrend only to exit. This is how most profitable Supertrend users actually use it.
Supertrend strategy outline
- Regime filter — daily Supertrend green for longs, red for shorts.
- Setup — intraday Supertrend flips aligned with daily bias.
- Entry — market order on flip confirmation (next bar open).
- Stop — the Supertrend line itself (or a fixed multiple of ATR beyond the flip bar).
- Exit — opposite flip, or ATR-multiple profit target.
Automating Supertrend with CrossTrade
Convert to a strategy() script and pair with the CrossTrade webhook payload:
key=YOUR-SECRET-KEY;
command=place;
account=Sim101;
instrument=ES 03-26;
action={{strategy.order.action}};
qty={{strategy.order.contracts}};
order_type=market;
tif=day;
sync_strategy=true;
market_position={{strategy.market_position}};
prev_market_position={{strategy.prev_market_position}};
out_of_sync=flatten;
Set out_of_sync=flatten so if NT8 and TradingView ever disagree on position state, NT8 flattens to the safe state.
Frequently Asked Questions
What are the best Supertrend settings for day trading?
Defaults of 10-period ATR and 3.0 multiplier work well on most intraday futures. For scalping, some traders drop the multiplier to 2.0 for faster flips. For swing trading, 14 ATR with 3.0 multiplier on the daily chart is a common setup.
Is Supertrend a leading or lagging indicator?
Lagging. Supertrend is derived from ATR, which is an average over past bars. It will not predict a trend — it will confirm one has started, after the fact.
Why does Supertrend whipsaw so much?
Because it flips on any close beyond the trailing band. In choppy, range-bound markets, price can cross the band repeatedly in a small range. Pair Supertrend with a regime filter like ADX > 20 or a higher-timeframe trend to avoid trading the chop.
Supertrend vs moving average crossover — which is better?
Supertrend's advantage is that it auto-adjusts to volatility via ATR. MA crossovers are fixed-period and don't adapt. In practice, performance is similar; traders pick based on visual preference and whether they want volatility-scaled stops.