全職奶爸

Supertrend Indicator: Formula, 10/3 Settings and Confirmed Flips

Supertrend: formula, trailing bands and TradingView settings

TRADINGVIEW · TREND AND VOLATILITY

Supertrend is an ATR-based trend indicator that plots one active band above or below price. The familiar green line represents its upward state; the red line represents its downward state. Its calculation remembers earlier bands, so the displayed line is not simply today’s midpoint plus or minus three times ATR.

For a reproducible starting point, this guide uses ATR Length 10 and Factor 3. These settings identify a calculation, rather than a winning strategy. A fresh change of state, a state that has lasted ten bars, and an actual stop order are three different things to record.

Read the line as a directional state

On a standard display, an upward Supertrend state places the active lower band beneath price. A downward state displays the upper band above price. The color helps you see the state, but templates can change colors. Match the line’s identity and position before interpreting a screenshot from another platform.

A persistent green line does not issue another buy signal on every bar. It says the calculation remains in its upward state. A flip is the event that changes that state. A trading method can use the state as a direction filter, the flip as a trigger, or the line as an exit reference. Each use requires its own entry and execution rules.

The indicator was created by Olivier Seban. Its appeal is the compact display: one active line summarizes a price-and-volatility rule. That display also hides information. A choppy market still receives one of the two states; Supertrend has no built-in neutral label that certifies a range has ended.

The Supertrend formula has three separate stages

The first stage measures volatility. True Range is the largest of the current high minus low, the absolute distance from the current high to the previous close, and the absolute distance from the current low to the previous close. Calculate all three distances and take the maximum. Choosing only high minus low loses the effect of a gap beyond the prior close.

TR = max(High − Low, |High − Previous Close|, |Low − Previous Close|)
Wilder ATR update = [(N − 1) × Previous ATR + Current TR] ÷ N

The recursive update uses the prior ATR, which already contains earlier information. Length 10 therefore does not mean a fresh simple average of only the latest ten ranges on every bar. When reproducing a chart, align the ATR method and starting history as well as the length. The Average True Range guide works through true range, Wilder smoothing, price units, and stop-distance calculations.

The second stage builds basic bands around the current bar’s midpoint. Here, midpoint means (High + Low) ÷ 2, often labeled HL2. It is neither the closing price nor the median of a list of recent closes. The highs and lows belong to this bar, rather than a rolling highest-high window.

Basic Upper = HL2 + Factor × ATR
Basic Lower = HL2 − Factor × ATR

The third stage creates the final, or trailing, bands. For the upper band, use the new Basic Upper if it is lower than the previous final upper, or if the previous close was above that previous upper. Otherwise, retain the previous final upper. For the lower band, use the new Basic Lower if it is higher than the previous final lower, or if the previous close was below that previous lower. Otherwise, retain the previous final lower.

Update those final bands before deciding the current state. If the prior state was downward, a current close strictly above the updated final upper changes it to upward. Otherwise, it stays downward. If the prior state was upward, a current close strictly below the updated final lower changes it to downward. Otherwise, it stays upward.

Plot the final lower in the upward state and the final upper in the downward state. This memory is what makes Supertrend different from drawing two fresh ATR offsets on every bar. It also explains why the line can stay flat while ATR and price both change.

A worked example: basic bands are not the flip threshold

Use a hypothetical ATR length of 3 and Factor 3 to keep the arithmetic short. Start from a declared, already established state: prior close 100, prior ATR 2, final upper 106, final lower 94, and a downward state. These supplied starting values make the example reproducible; they are not a claim about a platform’s first visible bar or default initialization.

Bar A has high 104, low 100, and close 103. True Range is 4. The next ATR is (2 × 2 + 4) ÷ 3 = 2.6667. HL2 is 102, so Basic Upper is 110 and Basic Lower is 94. The new basic upper is above the retained 106, and the prior close was below 106. The final upper therefore remains 106. A close of 103 leaves the state downward.

BarHigh / Low / CloseTRATR, N = 3Final upperFinal lowerState / active line
A104 / 100 / 10342.6667106.000094.0000Down / 106.0000
B108 / 103 / 10753.4444106.000095.1667Up / 95.1667
C111 / 106 / 11053.9630120.388996.6111Up / 96.6111
D112 / 99 / 100136.9753120.388996.6111Up / 96.6111
E101 / 94 / 9576.9835118.450696.6111Down / 118.4506

At bar B, ATR becomes 3.4444 and HL2 is 105.5. The new Basic Upper is 115.8333. The retained final upper is still 106, however, so close 107 crosses the actual threshold and changes the state to upward. Comparing that close only with the new 115.8333 basic band would miss the flip.

The retained upper band is the flip thresholdHypotheticalN3factor3example:previousdownstateupper106,currentclose107,newbasicupper115.8333.Finalupperremains106andclose107flipsup;newactivelower95.1667.The retained upper band is the flip thresholdHYPOTHETICAL · ATR Length 3 · Factor 3 · Bar BRetained final upper = 106 · Current close = 107107 > 106 → upward flip confirmed at this closeNew Basic Upper = 115.8333It is not the retained threshold used for this flip.After the flip, the displayed line switches to the lower at 95.1667.

The active line changes sides when the state flips. At B it switches from the upper band to the lower band at 95.1667. It does not slide continuously from 106 through the closing price. A chart can break the plotted line at that transition to avoid implying those intermediate prices were active stop levels.

Bar C raises the active lower to 96.6111. Then bar D expands ATR to 6.9753 and pushes Basic Lower down to 84.5741. The final lower remains 96.6111 because the trailing rule retains the higher prior band while the upward state survives. Close 100 is still above it.

ATR can rise while the active lower stays fixedHypotheticalbarsCtoD:N3factor3,ATRrises3.9630to6.9753,newbasiclowerfalls84.5741,finalactivelowerstays96.6111andclose100remainaboveit.ATR can rise while the active lower stays fixedHYPOTHETICAL · Upward state · Bar C → Bar DATR: 3.9630 → 6.9753The new Basic Lower falls to 84.5741.The retained active lower remains 96.6111.Close 100 stays above it → upward state survives.Fresh basic offsets and the plotted trailing line are different stages.

At E, close 95 finally falls below the retained lower, changing the state to downward. The active line becomes the final upper, 118.4506. Values in the table are rounded for display; the calculation carries full precision between bars. Repeatedly rounding ATR or bands during the calculation can change a borderline comparison.

Why the line is not always three ATR from price

Even a freshly calculated basic band is an offset from HL2, rather than necessarily from the close. A final band can additionally retain an earlier value. Both differences matter when you estimate risk from an indicator label.

At bar D, the close is 100 and the active lower is 96.6111. Their distance is about 3.3889 price units. Three times the current ATR is about 20.9259 units. Using that second number as the actual close-to-line distance would describe a different stop. Read the line’s price and subtract it from the planned entry.

The ratchet also limits the statement that rising ATR pushes the Supertrend farther away. Rising ATR widens the new basic offsets when other inputs are unchanged. It need not loosen an already retained active band. The worked example separates those two stages so a volatility explanation does not become a false description of the plotted line.

A Keltner Channel also uses a center and a range-based offset, but it displays channel boundaries under its own center, range, and length rules. Supertrend adds its band-retention and directional-state logic. Matching an ATR multiplier across the two does not make their plotted prices equivalent.

Set ATR Length and Factor in TradingView

Open your chart and choose the instrument, exchange, session, and interval you intend to test. Select Indicators, metrics, and strategies, search for Supertrend, and choose TradingView’s built-in indicator. A similarly named community script may add different sources, smoothing, filters, or alerts.

Open the settings gear beside the indicator’s name. In Inputs, set ATR Length = 10 and Factor = 3 for this guide’s baseline. If a calculation timeframe is available, select Chart for a chart-timeframe comparison. Check line names and colors in Style, then press Ok.

Ten refers to the ATR length in the selected calculation interval, not ten days regardless of the chart. On a continuous five-minute interval, ten bars span 50 minutes of bars; session breaks can make the elapsed clock period longer. Wilder smoothing also carries declining influence from older ranges through the prior ATR.

If you select a higher indicator timeframe, record when that timeframe’s values become available. A higher-timeframe bar can remain open across several smaller chart bars. Treat a displayed developing value and a confirmed higher-timeframe value as different inputs to a trading test.

The Wait for timeframe closes control, where offered, relates to the selected calculation timeframe. Its presence alone does not prove that every value on an open chart bar is frozen. For a closed-bar rule, evaluate the selected bar after it closes and configure alerts to match that timing.

The TradingView indicators guide covers finding tools, recording inputs, and checking script behavior. Before comparing two Supertrend panels, align the data feed, ordinary candle type, sessions, calculation interval, ATR method, factor, and starting history. Match the same closed-bar timestamp.

Supertrend indicator and Supertrend Strategy have different jobs

The indicator draws the calculation. TradingView’s Supertrend Strategy additionally simulates entries when the direction changes: long when the line switches below price and short when it switches above. It has strategy properties and a performance report. Adding an indicator alone does not turn its line into a tested order system.

Supertrend Strategy Inputs with ATR Length 10 and Factor 3; the dialog also has a Properties tab
Supertrend Strategy’s Inputs show ATR Length 10 and Factor 3. The Properties tab belongs to the strategy workflow. Open the image for the full interface.

A signal bar and a simulated fill bar can differ. With default strategy calculation and fill behavior, an order created after a bar closes can fill at the following bar’s open. Changed execution settings can change that behavior. Inspect the report’s order timestamps and properties instead of assuming the marker represents an immediately available closing-price fill.

Include commissions, slippage assumptions, sizing, and the chosen evaluation period when comparing reports. A simulated result without those details cannot establish what the same idea would deliver after trading costs. The settings illustration identifies controls; it is not evidence for a return you should expect.

Confirmed flips, wick crossings and equality

Use the final band that belongs to the previous directional state, updated under the current bar’s rules. A downward-to-upward event requires the close to be strictly above that upper band in the formula shown here. A close exactly equal to it leaves the downward state unchanged. Other scripts can choose a different comparison, so record the implementation before testing a borderline bar.

Consider another hypothetical bar from the same starting state: high 108, low 99, and close 103, with the retained upper at 106. Its wick reaches above the band, but the close finishes below it. Under the closed-bar condition, that wick is not a confirmed upward flip.

While a realtime bar is open, the latest close, high, and low can change. The indicator can recalculate and show a temporary state change that disappears before the close. A historical chart displays the final bar data, rather than every developing signal seen during that bar. Keep live observations when evaluating an intrabar method.

For a simple event definition, record a bullish flip only when the previous confirmed state was downward and the current confirmed state is upward. “The line is green” is a persistent-state condition. Counting each green bar as a new flip inflates the number of signals and can create repeated entries that were never part of the intended rule.

A strategy still needs a price entry, an invalidation, an exit, and a rule for another flip while a position is already open. An alert tells you that its programmed condition occurred. It does not decide whether the available price leaves an acceptable distance to the stop or target.

There is no universal best Supertrend setting

Changing 10 / 3 to 7 / 3 shortens the ATR length while leaving the factor at 3. Changing it to 10 / 2 alters the multiplier while preserving the length. A 7 / 2 versus 14 / 4 comparison changes both inputs. Separate those experiments if you want to understand which choice affected the outcome.

A smaller factor gives a smaller fresh offset for the same ATR and midpoint. Across a complete price path, the retained bands and state history also change. That does not prove every smaller-factor test must contain more flips, or that every larger-factor trade has a stronger signal.

For a one-minute, five-minute, or fifteen-minute setup, fix the session and complete trading rule before trying alternatives. The same parameters on those intervals measure different bar sequences. For swing trading, record overnight gaps and the position held between sessions. Merely changing the chart interval does not transfer an observed intraday result to a multi-day method.

Range-bound trading can repeatedly cross the thresholds, producing whipsaws. Increasing the factor changes the threshold path; it does not establish that the range has become a trend. Compare losing sequences and missed moves as well as successful directional runs.

ADX addresses directional strength under its own calculation. The ADX and DMI guide explains the separate lines and why ADX alone does not select long or short. Adding an ADX condition to Supertrend is a new rule to test, with its own missed signals and costs, rather than an automatic improvement.

The Parabolic SAR guide follows extreme prices with an acceleration factor. Its worked example shows a wick-triggered flip, a boundary-adjusted value, and why the new-side dot differs from the old reversal reference.

The Ichimoku Cloud guide offers a different view: five range-midpoint and shifted-price plots, with a cloud aligned to each chart position. Its worked example separates the current cloud from newly projected values.

A close-based exit and an actual stop order differ

A resting stop order can trigger while the bar is still open. A rule that waits for a confirmed Supertrend flip acts after the selected bar closes. Price can pass the reference line and recover before then. Specify which exit you intend to use; the indicator’s eventual color cannot retroactively cancel an order that already filled.

For a long-position trailing rule, follow the active lower only while your declared upward-state rule remains valid. When Supertrend flips, its displayed line moves above price. That new upper is not a replacement protective stop below a long position. The flip can instead trigger the separate exit action defined by the method.

Read the proposed stop as a price, round to the instrument’s permitted tick increment under a declared convention, and calculate the resulting distance from entry. If the plan allows a buffer outside the line, include that buffer in the distance. A line touch, a closing-price cross, and a worse fill after a gap can produce different realized losses.

Suppose a hypothetical entry is 100 and the chosen valid stop is 96.5. Risk distance is 3.5 price units before costs. Multiplying by the instrument’s money value per unit and quantity gives planned price risk. Add realistic transaction and execution allowances before comparing that amount with the trade budget. The position sizing calculator guide covers those units and quantity limits.

Start testing with standard candles, fixed input values, and a written entry and exit sequence. Keep a later sample outside parameter selection. Include trend days, choppy days, gaps, losing trades, and consecutive flips. If using a strategy report, record its fill and calculation settings alongside its costs.

For a PropFirm evaluation, compare the same risk plan with the current account rules, including position limits, drawdown method, and permitted trading times. The advertised account size does not establish the amount available to lose. Choose a plan only after its rules can accommodate the trade risk you intend to test.

Compare HDP discounts

Lucid 30% · Tradeify 30% · TPT 50%.

See current offers ↗

Eligible partner plans only.

Supertrend Indicator FAQ

What is the Supertrend indicator?

It is an ATR-based price overlay that retains trailing bands and plots one according to its directional state. The active lower represents an upward state; the active upper represents a downward state.

What does Supertrend 10 / 3 mean?

In this guide’s convention, 10 is ATR Length and 3 is Factor. Use the named fields when configuring a platform. The settings define the calculation rather than a profitable trading rule.

What does Supertrend 7 / 3 change?

It changes the ATR length from 10 to 7 while retaining Factor 3. Compare it under the same data, sessions, and trading rules; a changed length does not establish a better outcome.

What is the Supertrend formula?

Start with basic bands at the current bar’s HL2 plus or minus Factor × ATR. Apply the prior-band and prior-close retention rules, then use the current close and prior state to choose the final upper or lower.

Does Supertrend use the close or the bar midpoint?

The basic bands use HL2, the current high plus low divided by two. Closing prices participate in the band-retention and directional-state tests. Replacing the band center with the close changes the formula.

Does touching the line change the direction?

The shown formula uses a strict close above the upper or below the lower, depending on prior state. Equality alone does not flip it, and a wick crossing is not a confirmed closed-bar event.

Can Supertrend change before a candle closes?

Yes. An open bar’s high, low, and latest close can update and change the developing calculation. A closed-bar method evaluates after the chosen calculation bar closes; a timeframe checkbox alone is not proof of frozen values.

Does a green Supertrend mean buy immediately?

Green describes an upward state under the selected color scheme. A fresh flip and a continuing state are different conditions. An entry rule also needs a price, invalidation, sizing, and exit.

Is the line always three ATR away from price?

No. Basic bands are offsets from HL2, which can differ from the close, and final bands may retain older values. Calculate the actual entry-to-line distance from the plotted prices.

Can rising ATR move an active lower band downward?

Rising ATR can lower the new basic lower candidate. While the shown upward-state trailing rule retains the prior higher lower band, the active line does not loosen merely because that candidate fell.

What is the best setting for a five-minute chart?

There is no universally best setting. Record a baseline such as ATR Length 10 and Factor 3, then compare a small declared set under the same session, entries, exits, costs, and separate evaluation sample.

Is Supertrend profitable or does it have a fixed success rate?

The indicator alone has no universal profit or success rate. Outcomes depend on the complete trading rules, instrument, sample, costs, sizing, and execution. A selected chart or another strategy’s backtest does not establish your result.

How is Supertrend different from ATR and ADX?

ATR describes price volatility, ADX describes directional strength, and Supertrend adds a stateful directional overlay built from ATR-based bands. They answer different questions and do not replace the price entry or risk plan.

Is Supertrend Strategy the same as the indicator?

The indicator plots the calculation. The strategy also simulates orders and reports results under its execution, sizing, and cost settings. A signal time and a simulated fill time can differ.