Indicator Functions


Wilder's Parabolic Stop And Reverse


SAR(dir {0}, accel {0.02}, max {0.2}, len {100})


dir - the trend direction to use

accel {0.02} - initial acceleration factor

max {0.2} - maximum acceleration factor

len {100} - number of bars to use in the calculation

(any of the above can be any formula)


Implements the Parabolic Time/Price System as an indicator function for use in trading strategies.

To calculate SAR using a value series other than Close, use SarF.

The dir parameter (trend direction) is interpreted as follows:

the default value of 0 means to follow the trend as in the original indicator, i.e. to return a long exit price during an up-trend or a short exit price during a down trend

a positive value means always return the long stop price

a negative value means always return the short stop price





Copyright © 2020-2023 Systematic Solutions, LLC