MQL4 Reference Technical Indicators iAlligator

iAlligator

Calculates the Alligator indicator and returns its value.

double  iAlligator(
   string       symbol,            // symbol
   int          timeframe,         // timeframe
   int          jaw_period,        // Jaw line averaging period
   int          jaw_shift,         // Jaw line shift
   int          teeth_period,      // Teeth line averaging period
   int          teeth_shift,       // Teeth line shift
   int          lips_period,       // Lips line averaging period
   int          lips_shift,        // Lips line shift
   int          ma_method,         // averaging method
   int          applied_price,     // applied price
   int          mode,              // line index
   int          shift              // shift
   );

Parameters

symbol

[in]  Symbol name on the data of which the indicator will be calculated. NULL means the current symbol.

timeframe

[in]  Timeframe. It can be any of ENUM_TIMEFRAMES enumeration values. 0 means the current chart timeframe.

jaw_period

[in]  Blue line averaging period (Alligator's Jaw).

jaw_shift

[in]  Blue line shift relative to the chart.

teeth_period

[in]  Red line averaging period (Alligator's Teeth).

teeth_shift

[in]  Red line shift relative to the chart.

lips_period

[in]  Green line averaging period (Alligator's Lips).

lips_shift

[in]  Green line shift relative to the chart.

ma_method

[in]  MA method. It can be any of Moving Average methods. It can be any of ENUM_MA_METHOD enumeration values.

applied_price

[in]  Applied price. It can be any of ENUM_APPLIED_PRICE enumeration values.

mode

[in]  Data source, identifier of the indicator line. It can be any of the following values:

MODE_GATORJAW - Gator Jaw (blue) balance line,
MODE_GATORTEETH - Gator Teeth (red) balance line,
MODE_GATORLIPS - Gator Lips (green) balance line.

shift

[in]  Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Returned value

Numerical value of the Alligator indicator.

Example:

  double jaw_val=iAlligator(NULL,0,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_GATORJAW,1);