TrendPine Script v6

ta.sar()Parabolic SAR

Parabolic SAR (stop and reverse) is a method to find potential reversals in the market price direction.

Syntax

Syntax
ta.sar(start, inc, max) → series float

Arguments

ParameterTypeDescription
startsimple int/floatStart value.
incsimple int/floatIncrement value.
maxsimple int/floatMaximum value.

Returns

Parabolic SAR.

Code Examples

Pine Script v6 Example
//@version=6
indicator("ta.sar")
plot(ta.sar(0.02, 0.02, 0.2), style=plot.style_cross)

Trading Applications

Identify trend direction and potential reversals

Set trailing stop-loss levels

Determine entry/exit points based on SAR flip

Combine with trend filters for improved accuracy

Related Functions

Frequently Asked Questions

ta.sar() returns the Parabolic SAR: a stop-and-reverse style overlay that trails price and flips when price moves far enough against the current trend, based on start, increment, and maximum acceleration parameters.

Many traders trail stops at the SAR level in the direction of the trade, updating each bar. When price crosses the SAR, it may signal a potential reversal or exit—combine with volatility and structure, not SAR alone.

A common starting point is start 0.02, increment 0.02, maximum 0.2 (Wilder-style defaults expressed as acceleration factors). Adjust for asset volatility and timeframe.

Generate ta.sar() Code with AI

Draft Pine Script using ta.sar() with Pineify's AI Coding Agent, then review the arguments and test the result on your chart. Usage depends on your plan and available credits.