Parabolic SAR
Trailing stop-and-reverse level that speeds up as the trend runs.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| af_step | float | 0.02 | 0.001 to 1 |
| af_max | float | 0.2 | 0.01 to 1 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| sar | value | Optional | color 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.