IIndicatorsAccessor.ParabolicSAR
method · IIndicatorsAccessor · cAlgo.API.Internals
DesktopCLICloud
The Parabolic SAR indicator identifies potential reversals in the market direction
Overloads
| Signature |
|---|
ParabolicSAR(double minAf, double maxAf) |
ParabolicSAR(Bars bars, double minAf, double maxAf) |
ParabolicSAR(double minAf, double maxAf)
The Parabolic SAR indicator identifies potential reversals in the market direction
ParabolicSAR ParabolicSAR(double minAf, double maxAf)
api.Indicators.ParabolicSAR(minAf: float, maxAf: float) -> ParabolicSAR
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
minAf | double | float | The minimum accumulation factor |
maxAf | double | float | The maximum accumulation factor |
Returns ParabolicSAR — ParabolicSAR indicator instance
Examples
var parabolicSar = Indicators.ParabolicSAR(0.02, 0.2);
var trend = parabolicSar.Result.LastValue < Symbol.Bid ? "up" : "down";
Print("Parabolic SAR: {0}, trend: {1}", parabolicSar.Result.LastValue, trend);
parabolicSar = api.Indicators.ParabolicSAR(0.02, 0.2)
trend = "up" if parabolicSar.Result.LastValue < api.Symbol.Bid else "down"
api.Print(f"Parabolic SAR: {parabolicSar.Result.LastValue}, trend: {trend}")
ParabolicSAR(Bars bars, double minAf, double maxAf)
The Parabolic SAR indicator identifies potential reversals in the market direction
ParabolicSAR ParabolicSAR(Bars bars, double minAf, double maxAf)
api.Indicators.ParabolicSAR(bars: Bars, minAf: float, maxAf: float) -> ParabolicSAR
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
bars | Bars | Bars | The Bars that will be used by indicator, you can pass another timeframe/symbol bars |
minAf | double | float | The minimum accumulation factor |
maxAf | double | float | The maximum accumulation factor |
Returns ParabolicSAR — ParabolicSAR indicator instance
Examples
var dailyBars = MarketData.GetBars(TimeFrame.Daily);
var dailySar = Indicators.ParabolicSAR(dailyBars, 0.02, 0.2);
Print("Daily Parabolic SAR: {0}", dailySar.Result.LastValue);
dailyBars = api.MarketData.GetBars(TimeFrame.Daily)
dailySar = api.Indicators.ParabolicSAR(dailyBars, 0.02, 0.2)
api.Print(f"Daily Parabolic SAR: {dailySar.Result.LastValue}")