SuperTrend
By LuxAlgoApr 13, 2020
The SuperTrend plots a single trailing stop line that rides below price while the trend is up and above it while the trend is down, flipping sides when price closes through it. The line is built from the average true range — it sits at the median price (the midpoint of high and low) plus or minus a multiple of ATR — and it may only move in the trend's favor, toward price or holding still, until a close through the band flips the state. This build follows the standard SuperTrend formula as originally published, with the classic 10-period ATR and multiplier of 3, drawn as an Uptrend segment below price and a Downtrend segment above it.
How to Trade the SuperTrend?
- Line below price (Uptrend): the bullish state — trailing support and the running invalidation for longs.
- Line above price (Downtrend): the bearish state — trailing resistance and the invalidation for shorts.
- Flip to an uptrend: a close above the upper band jumps the line below price — the classic long entry or short exit.
- Flip to a downtrend: a close through the lower band, the mirror signal.
- Distance from price: the ATR offset grows with large bars and shrinks with small ones, adapting stop distance automatically.
Direction, stop placement, and reversal trigger compress into one line. The cost is the one every trailing method pays: thriving when moves run, bleeding in chop where flips sell range lows and buy range highs.
SuperTrend Settings
- ATR Length (default 10): bars used to compute the Wilder ATR; longer steadies the offset, shorter adapts faster but jitters.
- Factor (default 3): the ATR multiplier setting how far the trailing stop sits from the bar midpoint; higher means fewer flips but larger give-back, lower trails tighter and whipsaws more.
Alerts
Two alert conditions — Trend Flip Up and Trend Flip Down — fire on each state change.
Frequently Asked Questions
How is the SuperTrend different from a moving average?
A moving average re-smooths every bar and drifts toward price in consolidation. The SuperTrend is stateful — the line holds or advances with the trend until a close through the band flips everything — so direction is a binary state rather than slope interpretation.
Can the SuperTrend be used as a trailing stop?
That is arguably its primary job: the line is a ready-made trailing stop that tightens as a trend matures and never gives ground back mid-position, with the flip as an unambiguous exit.
What are the best SuperTrend settings?
The 10/3 defaults are the published classic. A larger Factor or longer ATR Length suits position traders riding deep pullbacks; tighter values suit faster styles that accept more flips. Less lag always buys more whipsaw, so tune to the holding period.
Free indicator
Get free access to this indicator on the platforms below.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
