SAR: Parabolic Stop-and-Reverse

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The Parabolic Stop-and-Reverse calculates a trailing stop. Developed by J. Welles Wilder.

Usage

1
SAR(HL, accel = c(0.02, 0.2))

Arguments

HL

Object that is coercible to xts or matrix and contains High-Low prices.

accel

accel[1]: Acceleration factor.
accel[2]: Maximum acceleration factor.

Details

The calculation for the SAR is quite complex. See the URLs in the references section for calculation notes.

The SAR assumes that you are always in the market, and calculates the Stop And Reverse point when you would close a long position and open a short position or vice versa.

Value

A object of the same class as HL or a vector (if try.xts fails) containing the Parabolic Stop and Reverse values.

Author(s)

Joshua Ulrich

References

The following site(s) were used to code/document this indicator:
https://www.linnsoft.com/techind/parabolic-sar-sar
http://www.fmlabs.com/reference/SAR.htm
http://www.stockcharts.com/school/doku.php?id=chart_school:technical_indicators:parabolic_sar
https://www.metastock.com/Customer/Resources/TAAZ/?p=87

See Also

See ATR and ADX, which were also developed by Welles Wilder.

Examples

1
2
data(ttrc)
sar <- SAR(ttrc[,c("High","Low")])

TTR documentation built on July 11, 2017, 9:03 a.m.

Related to SAR in TTR...