Bullish flip entry
The textbook Supertrend long: enter the bar after the indicator flips bullish.
Supertrend
A volatility-adjusted trend-following indicator that flips bullish or bearish when price crosses through a dynamic ATR-based band.
Supertrend is a trend-following indicator that plots a single line acting as dynamic support in uptrends and resistance in downtrends. Built on ATR-based bands, the line "flips" bullish or bearish when price closes through it. Default settings: factor 3, ATR period 10.
Supertrend plots a single dynamic line that sits below price during uptrends (acting as support) and above price during downtrends (acting as resistance). The line's distance from price is set by ATR × a multiplier (default factor 3, ATR period 10) — so the indicator widens during volatile periods and tightens during calm ones.
When price closes through the line, the indicator "flips" — bullish becomes bearish or vice versa. That flip is the core signal. Supertrend is designed to keep traders in the trend until it materially changes, but it can whipsaw in choppy ranges. Pair with a regime filter (ADX, range detection) for better outcomes.
Entry ideas
The textbook Supertrend long: enter the bar after the indicator flips bullish.
A trend-continuation long that buys clean pullbacks to the Supertrend support level.
A higher-conviction long that fires only when both a fast and slow Supertrend agree.
Exit ideas
The standard Supertrend exit: close when the indicator flips against the trade.
A tighter exit that locks profit faster using a more reactive Supertrend.
An early-warning exit that fires when fast and slow Supertrends stop agreeing.
Utilities
A trend-direction filter that keeps any system aligned with the prevailing Supertrend regime.
A maturity filter that ignores fresh Supertrend flips until they've held for a few bars.
| Parameter | Default | When to adjust |
|---|---|---|
| Factor (multiplier) | 3.0 | Distance multiplier on ATR. Lower (2.0) = tighter line, more flips; higher (4.0) = wider line, fewer flips and longer trend rides. |
| ATR period | 10 | Lookback for the ATR calculation that sets line distance. Shorter (5) = more reactive line; longer (14) = smoother. |
| Source for trigger | Close | Pine's ta.supertrend() uses close to detect flips. Some custom variants use HLC3 for slightly less wick-induced noise. |
//@version=5
indicator("Supertrend Example", overlay=true)
factor = input.float(3.0, title="Factor", minval=0.1, step=0.1)
atrPeriod = input.int(10, title="ATR Period", minval=1)
[supertrend, direction] = ta.supertrend(factor, atrPeriod)
upTrend = direction < 0 ? supertrend : na
downTrend = direction >= 0 ? supertrend : na
plot(upTrend, title="Up Trend", color=color.green, style=plot.style_linebr, linewidth=2)
plot(downTrend, title="Down Trend", color=color.red, style=plot.style_linebr, linewidth=2)Pine's ta.supertrend() returns both the line value and direction (negative = bullish, positive = bearish). Plotting bullish and bearish segments separately (with plot.style_linebr to break the line on flips) gives a clean visual: green when price is supported, red when resisted. Direction flips fire only on a confirmed close through the line — built-in confirmation, no extra logic needed.
Supertrend builds a single line from ATR-based bands and flips direction when price closes across it. The factor controls how far the line sits from price; ATR scales the distance to the asset's volatility.
Supertrend is purpose-built for trending markets and fails in choppy ones.
Sideways ranges produce repeated flip signals — the line jumps from above price to below price every few bars as price oscillates within a band. Each flip looks like a regime change but is just noise. Traders following every flip get whipsawed.
Low-volatility consolidation. ATR shrinks during quiet periods, so the line tightens close to price. Even small fluctuations cross the line, generating false flips.
Sudden volatility expansions (news events, gaps). The line is set with stale ATR data; a sudden gap can blow through the line by a wide margin and the next bar's flip happens at a much worse level than the indicator's design assumes.
Pair Supertrend with a regime filter (ADX above 20, Bollinger width expansion, range-detection logic) to gate trades to genuine trending periods.
| Indicator | When to prefer |
|---|---|
| EMA (50 or 200) | Long EMAs are smoother and lag more than Supertrend. Use EMAs for trend bias on swing setups; use Supertrend for tighter, volatility-adjusted entries and exits. |
| ATR trailing stops | Raw ATR-based stops give you the same volatility-adjusted distance as Supertrend, but without the flip mechanic. If you want a directional signal use Supertrend; if you want pure stop sizing use ATR. |
| MACD | MACD is unbounded and oscillates around zero — better for momentum nuance and divergences. Supertrend is a simple binary regime read with no momentum information. |
The factor multiplies ATR to set the distance between the Supertrend line and price. Higher factor = wider distance = fewer flips, longer trend rides, more giveback before the line flips. Lower factor = tighter line, more flips, smaller giveback. The default 3.0 balances responsiveness against whipsaw noise.
Supertrend builds its line from ATR-based bands around price. In a range, price oscillates back and forth across the line, triggering flip after flip. The line was designed to ride trends, not navigate ranges. Always pair Supertrend with a regime filter (ADX above 20, range-detection logic) so flips only fire during trending markets.
Pine's default is ATR period 10. Some traders prefer 14 (matching Wilder's standard ATR period) for smoother readings. The difference is small; either works. The factor matters more than the ATR period for tuning sensitivity. If switching, retune your factor accordingly.
Standalone Supertrend works on strongly trending instruments (commodities, large-cap stocks during clear regimes) and fails on choppy ones. Most successful systems combine: (1) Supertrend for entry timing, (2) a higher-timeframe trend filter, and (3) a regime/volatility filter to skip choppy periods. Bare Supertrend whipsaws too often to be a complete strategy.
Continue exploring
Moving Average Convergence Divergence
A trend-momentum indicator built from the difference between two EMAs, plus a signal line and histogram that visualise momentum shifts.
View MACDMomentumRelative Strength Index
A momentum oscillator that measures the speed and magnitude of recent price changes on a bounded 0–100 scale.
View RSIVolatilityBollinger Bands
A volatility envelope built from a moving average and ±2 standard deviations, expanding and contracting as volatility changes.
View BBAbout these ideas
Each entry, exit, and utility rule in the Playbook is hand-picked from established trading literature, validated against historical backtests, and reviewed by the PineWiz team. We add new ideas as we encounter them and refresh existing ones when market behavior or default settings shift. Last review: .
Educational content. Not financial advice.