Parabolic SAR
Parabolic SAR is used to identify potential reversal points in the market.
Method
tm.ta.sar(source_high, source_low, acceleration, maximum)
Inputs
Parameter | Argument type | Description | Default Value |
---|---|---|---|
source_high | pd.Series | High prices series | - |
source_low | pd.Series | Low prices series | - |
acceleration | float | Acceleration factor for the indicator | 0 |
maximum | float | Maximum value for the indicator | 0 |
Outputs
Output | Type |
---|---|
sar | np.ndarray |
Example usage
import tradomate as tm
@tm.strategy()def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out Parabolic SAR sar = tm.ta.sar(data.high, data.low, acceleration=0, maximum=0)
# Get the last value and print last_value = sar.iloc[-1] tm.log(f"Last value of Parabolic SAR is {last_value}")
# Plot the values of sar tm.plot(sar, title="Parabolic SAR", overlay=False)