Indicators
Supertrend Indicator Explained: A Trend-Following Trailing Stop
How the Supertrend indicator uses ATR to flip between bullish and bearish, why it doubles as a trailing stop, and how to automate it in Setup.Cash.
Featured image placeholder
/og/setup-cash-og.svg
Supertrend is a trend-following indicator that plots a single line which flips above or below price to signal the trend. It is popular because it is simple to read and doubles as a built-in trailing stop.
How Supertrend Works
Supertrend uses two inputs: an ATR length (default 10) and a multiplier (default 3). It builds bands a multiple of ATR away from price, then "locks" to one side:
- When the line is below price and green, the trend is up.
- When the line is above price and red, the trend is down.
- A flip (price closing through the line) signals a trend change.
Because the bands are ATR-based, Supertrend automatically adapts to volatility — wider in fast markets, tighter in calm ones.
Trading Supertrend
Trend following. Go long when Supertrend flips bullish, exit (or reverse) when it flips bearish. This keeps you on the right side of sustained moves.
Trailing stop. Even if you enter on another signal, the Supertrend line is a natural trailing stop: stay in the trade while price holds above (for longs) the line.
Building It in Setup.Cash
Add the Supertrend indicator in the builder, set the ATR length and multiplier, and create entries on the flip. Or describe it: "Supertrend(10, 3) flips on BTCUSD 1h, exit on opposite flip" in text-to-strategy.
Strengths and Weaknesses
- Strength: excellent in trending markets; clear, unambiguous signals; built-in volatility-aware stop.
- Weakness: whipsaws in sideways markets — it flips repeatedly with no follow-through.
The fix is the same as for most trend tools: add a regime filter so you only trade Supertrend flips when a higher timeframe agrees, or when volatility (ATR) is rising.
Tuning
- Higher multiplier (3–4): fewer flips, fewer whipsaws, later signals.
- Lower multiplier (1.5–2): more responsive, more noise.
- Longer ATR length: smoother, steadier line.
Backtest a few combinations — the best multiplier depends on the instrument and timeframe.
Build a Custom Variant
In the Indicators Lab you can build ATR-based trend tools with the atr function, including custom trailing logic. Generate one with AI or write it by hand.
Supertrend is one of the cleanest ways to define "the trend is up or down" in code. Pair it with disciplined risk and a regime filter, and always validate with backtesting and paper trading before trading it live.
Related Posts
View allIndicators
Ichimoku Cloud Explained for Automated Trading
Understand the five Ichimoku lines, how the cloud (Kumo) defines trend and support/resistance, and how to automate Ichimoku signals in Setup.Cash.
2 min read · 381 words
Indicators
MACD Indicator Explained for Automated Trading
How the MACD (Moving Average Convergence Divergence) works, what the signal line and histogram tell you, and how to build a MACD strategy in Setup.Cash.
2 min read · 336 words
Indicators
Moving Averages Explained: SMA, EMA, WMA, RMA
How simple, exponential, weighted, and smoothed moving averages differ, when to use each, and how to build a moving-average strategy in Setup.Cash.
2 min read · 401 words
Indicators
ADX and DI Explained: Measuring Trend Strength
How the Average Directional Index measures trend strength, how +DI and −DI show direction, and how to use ADX as a regime filter in Setup.Cash.
2 min read · 291 words
Start here
Build your trading bot workflow with structure
Use Setup.Cash to create, backtest, and paper trade rule-based strategies without relying on guesswork. Not financial advice. Trading involves risk.