sar

sar(minaf, step, maxaf)
Parameters
  • minaf (numeric) – Minimal acceleration factor.

  • step (numeric) – Acceleration change step.

  • maxaf (numeric) – Maximal acceleration factor.

Returns

series

Returns the parabolic stop and reverse instrument for the current security.

Calculation

Let:

  • EP to be the highest high of the current uptrend or the lowest low of the current downtrend.

  • AF to be the acceleration factor. AF starts at minaf and increases by step every time the EP rises in a Rising SAR or EP falls in a Falling SAR. AF is limited by maxaf

Then:

  • For the rising rising Parabolic SAR: \(\mathrm{sar} = \mathrm{sar}_1 + \mathrm{AF}_1 (\mathrm{EP}_1 - \mathrm{sar}_1)\)

  • For the falling Parabolic SAR: \(\mathrm{sar} = \mathrm{sar}_1 - \mathrm{AF}_1 (\mathrm{sar}_1 - \mathrm{EP}_1)\)