Supertrend¶
Indicators · Trend
ATR-based trend-following line with flip signals.
Supertrend is a trend-following line that does two jobs at once: it tells you which side of the market to be on, and it gives you a trailing stop level to ride it. The line flips below price in an uptrend (acting as support) and above price in a downtrend (acting as resistance). Each flip is a clean, unambiguous signal — which is exactly why it's a favourite for systematic, rules-based entries.
How it works¶
It's built on volatility, not a moving average. The block computes ATR over the ATR period (default 10), multiplies it by Multiplier (default 3.0), and lays that band above and below the bar's median price. The ST line locks onto whichever band the trend respects, and only flips to the other side when price closes decisively through it — so the line ratchets in the trend's favour and never loosens.
The block hands you everything you need: Long? / Short? stay true for the whole duration of each trend, while Flip ↑ / Flip ↓ fire on the single bar the trend changes (drawn as arrows). Those flips are your entries; the ST line itself is your trailing stop.
When to use it¶
Supertrend belongs in trending markets — it's a trend-rider, full stop. Its weakness is the range: in sideways chop the line flips back and forth and hands you a string of small losses. The fix is almost always a regime filter: only take flips when a trend actually exists. The Multiplier is the key dial — wider (3–4) means fewer, later, more durable signals; tighter (1.5–2) means earlier, more frequent, more whipsaw-prone ones.
Example¶
A filtered trend system: wire bars into Supertrend and into ADX / DMI, then put Flip ↑ and the ADX Trend? signal through an And gate into a Buy Signal so you only enter flips during real trends. Use the ST line as your stop by wiring it through a Structural Stop-Loss, and let it trail the winner. Backtest with and without the ADX gate in the Tester to see how many range-bound whipsaws it removes.
Tips & gotchas¶
- The Multiplier is everything. It's the single biggest driver of behaviour — tune it deliberately, but don't curve-fit it to the last decimal on past data.
- Range = death by a thousand cuts. Naked Supertrend in a flat market bleeds. A trend filter (ADX / DMI, Choppiness) isn't optional for serious use.
- The line is a free trailing stop. You rarely need a separate stop in the trend's direction — the ST line already trails it.
- Flips lag the top/bottom. You'll never catch the exact turn; Supertrend captures the middle of trends, giving back some at each end.
- Higher timeframes flip less. Drop it on H4/D1 for cleaner, more tradeable signals than the noisy intraday flips.
Related blocks¶
Inputs¶
| Socket | Type | What to wire in |
|---|---|---|
| Bars | bars |
Price bars |
Outputs¶
| Output | Type | Plots as | Description |
|---|---|---|---|
| ST | series |
Line | The supertrend line (price scale) |
| Long? | signal |
— | True while trend is up (line below price) |
| Short? | signal |
— | True while trend is down (line above price) |
| Flip ↑ | signal |
Signal arrows | True on the bar where trend flipped to long |
| Flip ↓ | signal |
Signal arrows | True on the bar where trend flipped to short |
Parameters¶
| Parameter | Type | Default | What it does |
|---|---|---|---|
| ATR period | number · 2–200 | 10 |
|
| Multiplier | number · 0.1–20.0 | 3.0 |
|
| Line color | colour | #26c6da |
Reference auto-generated from the block catalog · category Indicators.