SV

Street Verdict

Analyst Scorecard

All indicators
Trend

Parabolic SAR (Stop and Reverse)

Where should my trailing stop be?

A trailing stop that starts below (or above) the price and closes in on it faster as the trend runs, flipping sides when the price touches it.

Parabolic SAR on a chart of past prices

Stock
Period
Loading RELIANCE daily prices…

Settings: move a slider and the chart redraws

0.02

Where the acceleration factor starts on every new trend, up or down. A bigger start makes the dots close in faster from the first day.

0.02

How much faster it gets each time the trend makes a new extreme.

0.20

The fastest it is allowed to close in.

What it measures

SAR stands for stop and reverse. In an uptrend it is a level under the price that rises every day; in a downtrend, a level above the price that falls every day. The chart draws it as a dotted line: green under the price, red over it.

Each day it moves part of the way towards the extreme point: the highest high of the up move (or the lowest low of the down move). That part, the acceleration factor, starts at the starting step (0.02) on every new trend and grows by the step increase (0.02) each time the move makes a new extreme, up to the maximum (0.20). So the longer a trend runs, the faster the SAR closes in.

This is Wilder's original version, the same calculation the chart workbench and scripts use. One more rule keeps it out of the way: the SAR is never allowed inside the previous two candles. In an uptrend it is at most the lower of the last two lows; in a downtrend, at least the higher of the last two highs.

When a candle's low goes below the SAR in an uptrend (or its high goes above it in a downtrend), it flips to the other side of the price: the stop has been hit, and the trend reverses. The new SAR starts at the extreme point of the move that just ended.

How traders read it

  • Dots under the candles: uptrend. Dots over them: downtrend.
  • A flip is the classic signal and doubles as an exit, which is why traders use the dots as a trailing stop-loss. Marked on the chart.
  • Because it speeds up, it suits strong trends and gets out quickly when a trend stalls.

The traps

Always in the market

SAR is always on one side or the other, so in a sideways market it flips back and forth, and every flip costs money.

Too tight after a long run

Late in a trend the step is at its maximum and the SAR sits close to the price: one ordinary dip can stop you out.

Settings matter

A bigger step or maximum makes it hug the price; a smaller one gives more room but later exits.

Test the classic rule: SAR flip

Would following the textbook signal have made money on this stock, after every cost, compared with just holding it? Run it and see.

Waiting for prices…

Quick check

Three questions on RELIANCE's own chart, with the classic settings. Get two right to mark Parabolic SAR as done.

Waiting for prices…

Use it in a script

function run(bars, ta, helpers) {
  const sar = ta.parabolicSar(bars, 2, 2, 20);   // settings in percent: 2 means 0.02
  const signals = [];
  for (let i = 0; i < bars.length; i++) {
    if (bars[i].close > sar[i]) signals.push(helpers.buy(i));        // dots under the price
    else if (bars[i].close < sar[i]) signals.push(helpers.sell(i));  // dots over the price
  }
  return helpers.finalize(signals);   // keeps the first of each run: the flips
}

This is the rule tested above, with the settings on your sliders, and it gives exactly the same buy and sell candles. Paste it into the Scripts drawer of the chart workbench, or save it and compare it across stocks in the Strategy Lab. New to scripts? The Writing strategies track starts from zero.

In the reference:ta.parabolicSar