TradingView's built-in SuperTrend and <TvScript id="r6dAP7yi">SuperTrend</TvScript> by KivancOzbilgic (85,482 boosts on 12 November 2026) both start at ATR Period = 10 and ATR Multiplier = 3.0 around the candle midpoint (hl2), using Wilder's RMA smoothing and a close-based flip. Tightening to 7 × 2.0 pulls the stop a full 1.0 × ATR closer to price—doubling flips from 2 to 4 (plus 3 vanished mid-candle breaches) on our 96-candle (24-hour) 15-minute drill below—while enabling everget's wick trigger (13,661 boosts) turns every intrabar liquidity sweep into a permanent flip.
If you want the step-by-step math of Olivier Seban's formula and how it compares with two months of real gold candles, start with our SuperTrend indicator formula & flip guide, or see how 10 community variants rank in best SuperTrend indicators on TradingView, code-read. This guide opens the settings panel itself—input by input—across our 12 November 2026 TradingView script census (50 scripts in total—50 open source, 0 protected, and 0 invite-only).
Every SuperTrend input, read from the two reference scripts
Across the 50 SuperTrend scripts returned by TradingView's search on 12 November 2026, two open-source implementations define almost every setting traders ask about: KivancOzbilgic's 37-line Pine v4 classic (r6dAP7yi, 85,482 boosts) and everget's Pine v6 <TvScript id="VLWVV7tH">SuperTrend</TvScript> (VLWVV7tH, 13,661 boosts, GPL-3.0). Here is what each input actually changes inside the code:
| Input in Settings UI | Default (KivancOzbilgic / everget) | Exact Code Line & Formula Effect | Mechanical Trade-Off |
|---|---|---|---|
| ATR Period / ATR Length | 10 (KivancOzbilgic) / 22 (everget) | Lookback N passed into atr(N) or ta.atr(N) | Shorter (7) expands and contracts band width rapidly after a single wide bar; longer (14 or 22) keeps stop distance steadier across quiet pullbacks |
| Source | hl2 ((high + low) / 2) | Centre line from which ± Multiplier × ATR is measured | Switching hl2 to close or hlc3 shifts the band toward the candle's settlement price (closer to UT Bot Alerts settings) |
| ATR Multiplier | 3.0 in both | Distance scalar Multiplier * atr subtracted from or added to Source | Controls flip frequency far more than ATR Period: 2.0 hugs swings closely with frequent flips; 3.0–4.0 sits outside normal pullbacks with wider give-back |
| Change ATR Calculation Method ? | true (KivancOzbilgic L7, L9) | atr2 = sma(tr, Periods) vs atr = changeATR ? atr(Periods) : atr2 | Checked (true) = Wilder's RMA (α = 1 / N); unchecked (false) = equal-weighted SMA(TR, N), which jumps when a 10-bar-old news spike exits the window |
| Take Wicks into Account ? | true (everget L14, L17–18) | Replaces close with high and low in both ratchet and flip checks (and freezes stops on 4-price dojis) | Checked (true) flips mid-bar the moment a wick touches the prior band—even if the candle closes all the way back inside |
| Bar-Close Confirmation | Off in both (true in <TvScript id="31up9Ozt">SuperTrend + Relative Volume</TvScript>, 12,442 boosts) | Gates signals and alerts on barstate.isconfirmed | Prevents Buy/Sell tags from flashing 5 or 10 minutes into a bar and vanishing before the close |
Interactive drill: 10 × 3.0 vs 7 × 2.0, RMA vs SMA, and Close vs Wick
Click between the four ATR × Multiplier pairs (7 × 2.0, 10 × 3.0, 14 × 2.0, 22 × 3.0), toggle RMA (Wilder) against SMA (Simple), and switch Close vs High/Low Wick on 96 simulated 15-minute candles (24 hours after a 200-bar warm-up):
10 × 3.0 is Olivier Seban's and TradingView's standard default across 35 of the 50 scripts in our census.
10 × 3.0, RMA, Close: 2 trail flips in 24 simulated hours.
First flip on the 10:15 candle (up). No mid-candle breach vanished before the close at these settings. Other pairs with RMA + Close — 7 × 2.0: 4, 14 × 2.0: 4, 22 × 3.0: 2.
Simulated 15-minute candles, not live market prices: the same seeded 296-candle window (200 warm-up, 96 shown) used in our Hull settings drill. The SuperTrend band is computed by our own code from Olivier Seban's published midpoint ± multiplier × ATR formula, with switches for Wilder's RMA vs simple-average ATR and close vs high/low wick triggers. Partial readings are sampled 5 and 10 minutes into each bar; flip counts illustrate stop mechanics, not profitability.
Read preset comparison as table
- Flip up on the 10:15 candle (close vs prior stop 113.081; new stop 112.435).
- Flip down on the 14:00 candle (close vs prior stop 113.672; new stop 114.851).
Three things the 96-candle drill exposes immediately
10 × 3.0vs7 × 2.0(RMA,Close): At the classic10 × 3.0default, the ratcheted trail flips2times in24simulated hours with0vanished mid-candle breaches. Dropping to7 × 2.0doubles closed-bar flips to4and produces3dashed orange ghost breaches—moments5or10minutes into a15-minute bar where live price crossed the opposite band and then closed back inside.- Why
Take Wicks into Account(Wick) changes the ratchet and the flip: At14 × 2.0(RMA), switching fromClosetoWickincreases flips from4to6; at22 × 3.0(RMA), flips double from2to4. Because a candle's finalhighis at least as high as any intrabar spike (and its finallowat least as low), a wick trigger never un-flips before the close—instead, every stop-hunt wick that sweeps the band and reverses locks you into the opposite trend immediately. RMAvsSMAtrue range (changeATR): At14 × 2.0(Close), bothRMAandSMAend with4closed-bar flips, yetSMAsuffers3mid-candle ghost breaches vs1onRMAbecause old wide bars drop abruptly out of the14-bar simple average, narrowing the band faster during post-impulse consolidation.
One subtle difference between KivancOzbilgic and TradingView's ta.supertrend()
In KivancOzbilgic's r6dAP7yi (lines 12–17), the trend flips when close > dn1 or close < up1—comparing the current close against the previous bar's ratcheted band (dn[1] / up[1]). TradingView's built-in ta.supertrend(factor, atrPeriod) compares close against the current bar's ratcheted band (upperBand / lowerBand). When a violent reversal bar expands ATR sharply on the breakout bar itself, those two comparisons can land 1 bar apart.
Starting SuperTrend pairs by chart role (untested)
We haven't tested any row of this table on live markets; treat each pair as a place to start counting flips against your own instrument's spread, tick value, and commission rather than as a proven parameter set.
| Chart Role / Timeframe | Starting Pair (ATR × Mult) | Tighter Alternative | Wider Alternative | Mechanics to Watch Before Testing |
|---|---|---|---|---|
Fast Intraday (1m–5m) | 10 × 3.0 | 7 × 2.0 | 14 × 3.5 | Untested. On 1m–5m bars, broker spread is a large fraction of 1 × ATR; count flips and check best scalping indicators code read |
Session Trend (15m–1h) | 10 × 3.0 | 14 × 2.0 | 14 × 3.0 | Untested. Compare close-confirmed flips against Chandelier Exit 22 × 3.0 settings on the same session |
Swing / Crypto (4h) | 10 × 3.0 | 10 × 2.0 | 10 × 4.0 | On two months of real 4h gold candles in our SuperTrend formula guide, 10 × 2 flipped 13 times vs 3 times at 10 × 3 and 10 × 4 |
Daily Position (1D) | 22 × 3.0 | 10 × 2.5 | 22 × 3.5 | Untested. 22 bars spans roughly 1 trading month of weekday daily candles (everget's default lookback) |
Clean-Room Pine Script v6 SuperTrend (RMA/SMA + Close/Wick + Confirmed Alerts)
Instead of juggling three separate Pine v4 and v6 scripts, this standalone, clean-room //@version=6 indicator puts all four mechanical choices (ATR Length, Multiplier, RMA vs SMA, and Close vs Wick trigger) in one clean input panel and locks Buy/Sell markers and alertcondition() calls strictly to barstate.isconfirmed by default:
//@version=6
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ProEA Lab (https://proea.app)
indicator("ProEA SuperTrend v6 (RMA/SMA + Close/Wick + Confirmed)", shorttitle = "ST Settings v6", overlay = true)
string GRP_ST = "SuperTrend Parameters"
int atrLen = input.int(10, "ATR Length", minval = 1, group = GRP_ST)
float factor = input.float(3.0, "ATR Multiplier", minval = 0.25, step = 0.25, group = GRP_ST)
float centreIn = input.source(hl2, "Band Centre Source", group = GRP_ST)
string atrMode = input.string("RMA (Wilder)", "ATR Smoothing", options = ["RMA (Wilder)", "SMA (Simple)"], group = GRP_ST)
string trigMode = input.string("Close", "Flip & Ratchet Trigger", options = ["Close", "High/Low Wick"], group = GRP_ST)
bool waitBar = input.bool(true, "Confirm Flip Signals on Bar Close", group = GRP_ST)
float rawTr = ta.tr(true)
float atrVal = atrMode == "RMA (Wilder)" ? ta.rma(rawTr, atrLen) : ta.sma(rawTr, atrLen)
float rawFloor = centreIn - factor * atrVal
float rawCap = centreIn + factor * atrVal
bool useWick = trigMode == "High/Low Wick"
float upHold = useWick ? low[1] : close[1]
float dnHold = useWick ? high[1] : close[1]
float upBreak = useWick ? high : close
float dnBreak = useWick ? low : close
var float floorBand = na
var float capBand = na
var int trendDir = 1
if na(atrVal)
floorBand := na
capBand := na
else if na(floorBand[1]) or na(capBand[1])
floorBand := rawFloor
capBand := rawCap
trendDir := 1
else
bool flatBar = useWick and open == close and close == low and close == high
floorBand := flatBar ? floorBand[1] : (rawFloor > floorBand[1] or upHold < floorBand[1] ? rawFloor : floorBand[1])
capBand := flatBar ? capBand[1] : (rawCap < capBand[1] or dnHold > capBand[1] ? rawCap : capBand[1])
int prevDir = nz(trendDir[1], 1)
if prevDir == -1 and upBreak > capBand[1]
trendDir := 1
else if prevDir == 1 and dnBreak < floorBand[1]
trendDir := -1
else
trendDir := prevDir
bool gate = not waitBar or barstate.isconfirmed
bool flipUp = trendDir == 1 and trendDir[1] == -1 and gate
bool flipDn = trendDir == -1 and trendDir[1] == 1 and gate
float bullLine = trendDir == 1 ? floorBand : na
float bearLine = trendDir == -1 ? capBand : na
pMid = plot(hl2, "Midpoint Anchor", display = display.none)
pBull = plot(bullLine, "Bullish Trail", color = #089981, linewidth = 2, style = plot.style_linebr)
pBear = plot(bearLine, "Bearish Trail", color = #f23645, linewidth = 2, style = plot.style_linebr)
fill(pMid, pBull, color = color.new(#089981, 88), title = "Uptrend Fill")
fill(pMid, pBear, color = color.new(#f23645, 88), title = "Downtrend Fill")
plotshape(flipUp, "Confirmed Flip Up", shape.labelup, location.belowbar, #089981, text = "UP", textcolor = color.white, size = size.tiny)
plotshape(flipDn, "Confirmed Flip Down", shape.labeldown, location.abovebar, #f23645, text = "DOWN", textcolor = color.white, size = size.tiny)
alertcondition(flipUp, "SuperTrend Bullish Flip", "SuperTrend flipped bullish")
alertcondition(flipDn, "SuperTrend Bearish Flip", "SuperTrend flipped bearish")
When you want pullback entries, fee-adjusted sizing, and 20-symbol alerts
A raw SuperTrend flip tells you a candle crossed an ATR band—sometimes right at the exhaustion tip of a wide breakout bar where the stop back to the newly flipped band is 3 × ATR away.
- Drift Desk (full readable Pine v6 source in Pine Pro Library) builds on the
2.0 × ATR(14)closed-bar family around ahlc3centre shifted by candle-body pressure, turning only verified closed-bar flips into structured2Rplans. - Drift Desk Premium adds the workflow around every flip: higher-timeframe alignment, an automated wait of up to
10bars for price to pull back toward the trail before entry, lot-step position sizing with round-turn fees expressed inR,1Rpartial/breakeven management, and a20-symbol multi-asset scanner. Treat it as an execution toolset—its signals are not proven to earn more, and our out-of-sample20-coin backtest is published openly in Drift Desk: what we measured.
Use this animation on your site.
Frequently asked questions
What are the default SuperTrend indicator settings on TradingView?
Both TradingView's built-in SuperTrend and KivancOzbilgic's community SuperTrend (85,482 boosts on 12 November 2026) default to an ATR Period of 10, a Source of hl2 (candle midpoint), and an ATR Multiplier of 3.0 using Wilder's RMA smoothing on candle closes. everget's SuperTrend (13,661 boosts) widens the default ATR Period to 22 with a 3.0 multiplier and turns wick-based flips on by default.
What is the difference between SuperTrend 10, 3 and 7, 2?
Lowering the ATR Period from 10 to 7 and the Multiplier from 3.0 to 2.0 moves the trailing band one full ATR closer to the candle midpoint and makes its width react faster to recent bars. On the 96 simulated 15-minute candles in our drill (24 hours), 10 x 3.0 with RMA and Close flipped 2 times with 0 vanished mid-candle breaches, whereas 7 x 2.0 flipped 4 times and flashed 3 extra mid-candle breaches that disappeared by the close.
What does Change ATR Calculation Method do in KivancOzbilgic's SuperTrend?
In KivancOzbilgic's 37-line Pine v4 script, Change ATR Calculation Method defaults to true, which computes Wilder's exponentially smoothed RMA via atr(Periods). Unchecking that box switches the width to sma(tr, Periods), an equal-weighted simple average of true range where an outlier spike drops out abruptly after 10 bars instead of decaying smoothly.
Should SuperTrend flip on candle closes or high and low wicks?
Flipping on closes waits for the bar's closing price (or live last price until the bar closes) to cross the prior ratcheted stop, whereas everget's Take Wicks into Account option flips the instant a candle's high or low pierces the stop. On our 96 simulated 15-minute candles at 14 x 2.0 (RMA), switching from Close to Wick raised closed-bar flips from 4 to 6, and at 22 x 3.0 (RMA) from 2 to 4, because intrabar stop sweeps that closed back inside still locked in a trend reversal.
How do you stop SuperTrend Buy and Sell labels from disappearing mid-candle?
Most community SuperTrend scripts, including KivancOzbilgic's 85,482-boost classic, evaluate close > dn1 and close < up1 on the live unconfirmed bar, so a signal can appear 5 minutes into a 15-minute bar and vanish before the close. Either gate flip signals with barstate.isconfirmed, as Flux Charts' SuperTrend (12,442 boosts) and our Pine Script v6 build below do, or set TradingView alerts to Once Per Bar Close.
Are there proven best SuperTrend settings for scalping or swing trading?
No single ATR Length and Multiplier pair is proven best across markets, and we have not backtested timeframe-specific pairs as standalone strategies. Tighter pairs such as 7 x 2.0 or 10 x 2.0 reduce stop give-back when a trend reverses at the cost of more whipsaw flips in range chop, while wider pairs such as 10 x 3.0 or 22 x 3.0 sit through deeper pullbacks and give back more open profit when the trend finally turns.



