Parabolic Sar
_SARState
dataclass
Per-symbol mutable state for the Parabolic SAR computation.
Source code in src/onesecondtrader/indicators/wilders/parabolic_sar.py
ParabolicSAR
Bases: IndicatorBase
Parabolic Stop and Reverse (SAR) indicator.
Computes the Parabolic SAR as described by J. Welles Wilder Jr. One scalar value is produced per incoming bar and stored per symbol.
The rolling state is maintained independently for each symbol.
Until enough bars are received to initialise, the indicator yields numpy.nan.
name
property
Canonical indicator name.
Returns:
| Type | Description |
|---|---|
str
|
Stable identifier encoding all configuration parameters. |
Source code in src/onesecondtrader/indicators/wilders/parabolic_sar.py
__init__(af_start=0.02, af_step=0.02, af_max=0.2, max_history=100)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
af_start
|
float
|
Initial acceleration factor. |
0.02
|
af_step
|
float
|
Acceleration factor increment when a new extreme point is reached. |
0.02
|
af_max
|
float
|
Maximum acceleration factor. |
0.2
|
max_history
|
int
|
Maximum number of computed indicator values retained per symbol. |
100
|
Source code in src/onesecondtrader/indicators/wilders/parabolic_sar.py
_compute_indicator(incoming_bar)
Compute the Parabolic SAR value for a single received bar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
incoming_bar
|
BarReceived
|
Market bar used as input for the computation. |
required |
Returns:
| Type | Description |
|---|---|
float
|
SAR value, or |