Parabolic SAR

sartrendForge API 1

Trailing stop-and-reverse level that speeds up as the trend runs.

Inputs

NameTypeDefaultRange
af_stepfloat0.020.001 to 1
af_maxfloat0.20.01 to 1

Outputs

NameTypeRequiredDescription
sarvalueOptionalcolor theme.accent, style dots, width 2
Warm-up
1 bars (1 at the defaults)
Repaints
No
Parity
TA-Lib, within 1e-12

Formula

SAR[i+1] = SAR[i] + AF * (EP - SAR[i]), EP = the extreme price of the trend

AF starts at the step, grows by the step with each new extreme and stops at the maximum.

A reversal restarts EP and AF. The first leg is seeded short and is left empty until the first reversal the price itself causes.