ta.sar()
Parabolic SAR
Parabolic SAR (stop and reverse) is a method to find potential reversals in the market price direction.
Syntax
ta.sar(start, inc, max) → series floatArguments
| Parameter | Type | Description |
|---|---|---|
| start | simple int/float | Start value. |
| inc | simple int/float | Increment value. |
| max | simple int/float | Maximum value. |
Returns
Parabolic SAR.
Code Examples
//@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
Frequently Asked Questions
Generate ta.sar() Code with AI
Skip the manual coding. Use Pineify's AI Coding Agent to generate Pine Script code using ta.sar() and other built-in functions instantly.
Related Pine Script Functions
ta.supertrend() - Supertrend
Learn how to use ta.supertrend() in Pine Script. Syntax, parameters, code examples for the ATR-based trend overlay.
ta.macd() - MACD
Learn how to use ta.macd() in Pine Script. Syntax, parameters, code examples for MACD line, signal line, and histogram.
ta.dmi() - Directional Movement Index
Learn how to use ta.dmi() in Pine Script. Syntax, parameters, code examples for +DI, -DI, and ADX.
ta.atr() - Average True Range
Learn how to use ta.atr() in Pine Script. Syntax, parameters, code examples for the Average True Range volatility indicator.
ta.ema() - Exponential Moving Average
Learn how to use ta.ema() in Pine Script. Syntax, parameters, code examples, and trading applications for the Exponential Moving Average function.