IIndicatorsAccessor.Alligator
method · IIndicatorsAccessor · cAlgo.API.Internals
Legendary trader Bill Williams, an early pioneer of market psychology, developed the trend-following Alligator indicator, which follows the premise that financial markets and individual securities trend just 15% to 30% of the time while grinding through sideways ranges the other 70% to 85% of the time.
Overloads
Alligator(int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift, MovingAverageType maType)
Legendary trader Bill Williams, an early pioneer of market psychology, developed the trend-following Alligator indicator, which follows the premise that financial markets and individual securities trend just 15% to 30% of the time while grinding through sideways ranges the other 70% to 85% of the time.
Alligator Alligator(int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift, MovingAverageType maType)
api.Indicators.Alligator(jawsPeriods: int, jawsShift: int, teethPeriods: int, teethShift: int, lipsPeriods: int, lipsShift: int, maType: MovingAverageType) -> Alligator
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
jawsPeriods | int | int | The jaws period of Alligator |
jawsShift | int | int | The jaws shift of Alligator |
teethPeriods | int | int | The teeth period of Alligator |
teethShift | int | int | The teeth shift of Alligator |
lipsPeriods | int | int | The lips period of Alligator |
lipsShift | int | int | The lips shift of Alligator |
maType | MovingAverageType | MovingAverageType | Moving Average Type |
Returns Alligator — Alligator
Examples
var alligator = Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.Simple);
Print("Jaws: {0}, Teeth: {1}, Lips: {2}", alligator.Jaws.LastValue, alligator.Teeth.LastValue, alligator.Lips.LastValue);
alligator = api.Indicators.Alligator(13, 8, 8, 5, 5, 3, MovingAverageType.Simple)
api.Print(f"Jaws: {alligator.Jaws.LastValue}, Teeth: {alligator.Teeth.LastValue}, Lips: {alligator.Lips.LastValue}")
Alligator(DataSeries source, int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift, MovingAverageType maType)
Legendary trader Bill Williams, an early pioneer of market psychology, developed the trend-following Alligator indicator, which follows the premise that financial markets and individual securities trend just 15% to 30% of the time while grinding through sideways ranges the other 70% to 85% of the time.
Alligator Alligator(DataSeries source, int jawsPeriods, int jawsShift, int teethPeriods, int teethShift, int lipsPeriods, int lipsShift, MovingAverageType maType)
api.Indicators.Alligator(source: DataSeries, jawsPeriods: int, jawsShift: int, teethPeriods: int, teethShift: int, lipsPeriods: int, lipsShift: int, maType: MovingAverageType) -> Alligator
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
source | DataSeries | DataSeries | The source data used for the Alligator calculation. |
jawsPeriods | int | int | The jaws period of Alligator |
jawsShift | int | int | The jaws shift of Alligator |
teethPeriods | int | int | The teeth period of Alligator |
teethShift | int | int | The teeth shift of Alligator |
lipsPeriods | int | int | The lips period of Alligator |
lipsShift | int | int | The lips shift of Alligator |
maType | MovingAverageType | MovingAverageType | Moving Average Type |
Returns Alligator — Alligator
Examples
var alligator = Indicators.Alligator(Bars.ClosePrices, 13, 8, 8, 5, 5, 3, MovingAverageType.Simple);
var isUpTrend = alligator.Lips.LastValue > alligator.Teeth.LastValue && alligator.Teeth.LastValue > alligator.Jaws.LastValue;
Print("Alligator on close prices, up trend: {0}", isUpTrend);
alligator = api.Indicators.Alligator(api.Bars.ClosePrices, 13, 8, 8, 5, 5, 3, MovingAverageType.Simple)
isUpTrend = alligator.Lips.LastValue > alligator.Teeth.LastValue and alligator.Teeth.LastValue > alligator.Jaws.LastValue
api.Print(f"Alligator on close prices, up trend: {isUpTrend}")