Skip to content

SAR

Summary

Wilder's Parabolic SAR (Stop And Reverse): a trailing stop/reverse level that accelerates toward price via an acceleration factor. Signals trend direction and trailing exit points. SAR below price = uptrend (long); SAR above price = downtrend (short). Price crossing SAR flips direction.

Formula

SAR_next = SAR + af * (EP - SAR) EP = extreme point (highest high in long / lowest low in short); af starts at Acceleration, += Acceleration each new EP, capped at Maximum. On penetration: reverse, SAR := prior EP, reset af = Acceleration. SAR clamped each bar so it does not penetrate the prior/current bar's range.

Inputs

  • inPriceHL — High/Low price series

Outputs

  • outReal — Parabolic SAR stop/reverse level per bar

Parameters

  • optInAcceleration — Step added to the acceleration factor on each new extreme point
  • optInMaximum — Ceiling on the acceleration factor

Implementation

TA-Lib Definition: sar.c · sar.yaml

Native File
C ta_SAR.c
Rust sar.rs
Java Core.java

TA-Lib is also available for Python, R and more using a wrapper.

Aliases

Parabolic SAR, PSAR, Stop and Reverse

See Also

SAREXT · MINUS_DM · PLUS_DM

References

  • J. Welles Wilder, New Concepts in Technical Trading Systems, Trend Research (ISBN 0894590278)