Parabolic SAR
A trailing stop that tracks the trend: the line sits under price while it is up, over price while it is down.
Parabolic SAR is a trailing stop that flips with the trend. In an uptrend it climbs toward the highest high reached so far; in a downtrend it falls toward the lowest low. Each bar it closes a fraction of the gap to that extreme, starting at 0.02, growing by 0.02 each time price makes a new extreme, and capped at 0.2. When price crosses the line, the trend flips and the line jumps to the last extreme of the old trend, with the fraction reset to 0.02.
How to read it
- The line is drawn over the candles: under price while direction is +1, over price while it is -1.
- A cross of price through the line flips the trend. The line then jumps to the old extreme, far from price, and closes in slowly.
- Direction is a state, not an event: it holds +1 or -1 between flips. On the one-minute SPY sample for September 2026 it was +1 on most bars and -1 on at least 5%.
- In a sideways market price crosses the line often, so read the flips as noise unless the trend holds for a while.
What it outputs
- SAR
- The trailing stop level. Under price in an uptrend, over it in a downtrend. Within a trend it is held beyond the last two bars' lows or highs; a flip moves it to the old extreme.
- Direction
- +1 while the trend is up (the line is under price), -1 while it is down (the line is over price). It flips only when price crosses the line.
Settings
- af_start
- Acceleration at each new trend's start: the share of the gap to the extreme the line closes per bar (default 0.02). Raising it hugs price sooner and flips more often; lowering it keeps the line back longer.
- af_step
- How much acceleration grows each time price makes a new extreme (default 0.02). Raising it reaches the cap in fewer new extremes, so the line tightens faster and flips sooner on a pullback; lowering it keeps the line loose for longer.
- af_max
- The cap on acceleration (default 0.2). Raising it lets a long trend pull the line right up to price, so small pullbacks flip it; lowering it keeps the line wider and flips it only on bigger moves.
Pitfalls
- A stop level, not a forecast: a flip confirms that price has already crossed the line, so it comes after the reversal starts.
- Warm-up: the first bar has no value, and the second bar sets the starting direction from one comparison of its close with the first bar's high.
- The catalog accepts negative parameters, but a negative acceleration factor moves the line away from price; keep all three positive.