TradingView indicator comparisons

Supertrend vs Parabolic SAR: volatility bands and acceleration

Supertrend trails a carried-forward ATR band and changes direction when the close crosses it. Parabolic SAR projects a point toward the trend extreme, accelerates when that extreme advances, and reverses when the bar range penetrates the projected point. Choose the mechanism your rule needs, then compare identical prices: neither is always closer to price or produces fewer reversals.

See the decision guide

Two state algorithms, not interchangeable stop settings

This comparison follows TradingView's documented built-in calculations. Community scripts can change the source, smoothing or reversal test. M means (high + low) / 2; m is the Supertrend multiplier; EP is SAR's extreme point; AF is its acceleration factor. A plotted indicator is not itself a broker stop order.

  • Increasing the Supertrend multiplier widens its basic bands; its carried band need not move away from price on that bar. An ATR spike therefore does not automatically loosen the active line.
  • An outside bar can reverse SAR and extend the old trend extreme at the same time. From SAR 97, EP 100 and AF 0.02, a bar with high 103 and low 96 reverses down to 103 before the two-bar constraint, not to 100. The simple phrase reset to prior EP misses this case.
  • SAR continues moving toward EP even without a fresh extreme. AF only increases on a new extreme, not merely because another bar elapsed. The two-bar clamp can also prevent the projected movement.
State or updateSupertrendParabolic SAR
Candidate valueBasic bands: M + m × ATR and M − m × ATR.Projected SAR = previous SAR + previous AF × (previous EP − previous SAR).
MemoryUpper band resets if the basic upper is lower, or the previous close exceeded the previous upper. Otherwise retain it. Lower band resets if the basic lower is higher, or the previous close was below the previous lower.EP is the highest high in an up leg or lowest low in a down leg. A new extreme increases AF by its increment, capped at its maximum.
ReversalFrom down: close above the current upper band switches up. From up: close below the current lower band switches down. Equality holds direction.From up: low below projected SAR reverses. From down: high above projected SAR reverses. Strict penetration is required. On a reversal down, reset SAR to max(current high, prior EP); on a reversal up, use min(current low, prior EP). Reset AF to its start value and EP to the new leg's extreme before the historical constraint.
Output and constraintPlot lower band while up; upper band while down.After either branch, cap an uptrend point at the lower of the two preceding lows; floor a downtrend point at the higher of the two preceding highs. Apply the constraint using the resulting direction, including reversal bars.

A reproducible experiment with explicit starting state

The following are two separate six-bar synthetic paths, not market history or backtests. Reset both indicators before each path. Prices and distances use arbitrary price units. Begin with previous close 99, ATR 2, Supertrend upper 103, lower 95 and up direction. Begin SAR at 97, EP 100, AF 0.02 and up direction. The two preceding highs are 99 and 100; lows are 97 and 98. These are specified states, not a claim about how a fresh chart initializes.

  • Use ATR length 3 with Wilder smoothing: current ATR = (2 × previous ATR + current TR) / 3. TR is max(high − low, |high − previous close|, |low − previous close|). Use Supertrend multiplier 2 and SAR start/increment/maximum 0.02/0.02/0.20.
  • Update Supertrend bands before testing the current close. For SAR, project from prior state, test penetration, update or reset EP/AF, then apply the two-bar constraint in the resulting direction. Round only the displayed values to three decimals.
  • Every table cell uses the completed bar. Distance means absolute(close − current plotted line), including the new line after a reversal. It is descriptive distance, not the loss on an order or distance to the pre-reversal stop.
  • Count each change from the seeded up state once, including any first-bar reversal. The initial seed is not a flip. Open is unnecessary for these recurrences; no fills or intrabar price path are inferred.

Rising path: SAR is not always the tighter line

Both indicators receive the same rising high, low and close on each row. TR and ATR remain 2. Supertrend rises one unit per bar. SAR advances as AF increases, but its distance from a rising close still grows in this short example. Both remain up and finish with zero reversals.

  • Bar 1: the midpoint is 100, so the basic lower band is 100 − 2 × 2 = 96. SAR projects to 97 + 0.02 × (100 − 97) = 97.06, then the prior two-bar low clamps it to 97. The new high 101 raises EP to 101 and AF to 0.04.
  • Bar 2: SAR is 97 + 0.04 × (101 − 97) = 97.16. By bar 3 it lies farther from the close than Supertrend. Acceleration toward EP does not guarantee a monotonically shrinking distance to a moving price.
Bar: high / low / closeSupertrendSARST distance / SAR distanceSAR AF after bar
1: 101 / 99 / 10096.00097.0004.000 / 3.0000.04
2: 102 / 100 / 10197.00097.1604.000 / 3.8400.06
3: 103 / 101 / 10298.00097.4504.000 / 4.5500.08
4: 104 / 102 / 10399.00097.8944.000 / 5.1060.10
5: 105 / 103 / 104100.00098.5054.000 / 5.4950.12
6: 106 / 104 / 105101.00099.2844.000 / 5.7160.14

Sideways path: the penetration rule changes the flip count

Reset to the same starting states. Alternate the two high/low/close rows shown below three times. Supertrend keeps its lower band at 96 and stays up. SAR reverses on bars 2 through 6. ATR rises from 2 to about 3.142, but the retained Supertrend lower band does not move down. This deliberately small example demonstrates state behavior; it does not estimate typical whipsaw rates.

  • On bar 2 the low 97 penetrates projected SAR 97.16, despite the close 98 being above that projection. SAR moves to prior EP 101 and resets AF to 0.02. Supertrend does not reverse because 98 is above 96.
  • On bar 3, descending SAR projects to 101 + 0.02 × (97 − 101) = 100.92. High 101 penetrates it, so SAR returns to 97. Four of the five flips are followed by another flip on the next observed bar; the last has no subsequent observation.
  • Zero flips is not evidence of a better trading result. Supertrend still carries an up label during every down close here. Change the path, initial state or parameters and the ranking can change.
Bar: high / low / closeSupertrend / stateSAR / stateST distance / SAR distanceCumulative flips: ST / SAR
1: 101 / 99 / 10096 / Up97 / Up4 / 30 / 0
2: 100.5 / 97 / 9896 / Up101 / Down2 / 30 / 1
3: 101 / 99 / 10096 / Up97 / Up4 / 30 / 2
4: 100.5 / 97 / 9896 / Up101 / Down2 / 30 / 3
5: 101 / 99 / 10096 / Up97 / Up4 / 30 / 4
6: 100.5 / 97 / 9896 / Up101 / Down2 / 30 / 5

Choose using conditions you can test

Use the built-in indicators on one standard candlestick chart before adding filters. Match exchange symbol, timeframe, session, adjustments and history. Choose trend and range evaluation windows before looking at the comparison. Preserve the exact inputs and record values on the same completed bars.

  • There is no universal conversion from ATR length/multiplier to SAR start/increment/maximum. Compare a preselected input grid on the same windows, then check a separate period without retuning it.
  • For distance normalized by ATR, divide absolute price-to-line distance by ATR only when ATR is positive. A zero ATR makes this ratio undefined. Do not report infinity as a useful risk estimate.
  • Equality is not a strict crossing. Startup seeds and rounding can change the first reversal, so allow warm-up and compare unrounded values. A chart with limited history can disagree with a longer-history calculation.
  • Open-bar high, low and close can change, so a current plot or direction is provisional. Reading closed bars does not make a higher-timeframe input confirmed. An indicator reversal is also distinct from placing or filling an order.
Your requirementCandidate mechanismWhat to measure
A volatility-based band with a close-confirmed state changeSupertrendAbsolute and ATR-normalized distance, delay to a defined close reversal, and flips in a range.
A trail that moves toward a leg extreme and responds to wick penetrationParabolic SAREP/AF progression, two-bar clamps, wick-only reversals and reversals followed immediately by another flip.
A tighter executable stopNeither plot alone answers thisThe line available when the order is placed, fill rules, gaps, tick size, slippage and costs.

Write the selected rules before requesting code

Pine Script AI Coding Agent can draft and edit a script from your stated rules and request a syntax check. Specify both calculations, shared chart data, a completed-bar measurement table, distance units and a flip counter. If you add orders, separately define whether an exit uses intrabar penetration or a closing-price condition, which line is available at placement, and when a reversal may enter a new position.

  • Provide the synthetic inputs and seeds above when reproducing these tables. Normal chart-history initialization will not necessarily match this seeded experiment.
  • Inspect the resulting code, check syntax and compare numerical states before using a strategy report. Syntax validation does not establish rule correctness or profitable trading. This workflow does not read protected source, migrate accounts or execute trades for you.
Where Pineify fits

Pine Script AI Coding Agent

Draft a Supertrend/SAR comparison from explicit inputs and reversal rules, request syntax checking, and inspect the generated Pine Script before testing orders.

Draft a Supertrend/SAR comparison

Frequently asked questions

Educational comparison, not investment advice. Synthetic prices and seeded recurrences are not market backtests, fill simulations or evidence of returns. Indicator lines do not guarantee stop execution. Review generated code and trading rules independently.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.