iGator Indicator

Calculates the Gator oscillator and returns its value.

Function Signature

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

Parameters

  • **symbol**: Symbol name. NULL for current symbol.
  • **timeframe**: Timeframe. ENUM_TIMEFRAMES value. 0 for current chart timeframe.
  • **jaw_period**: Averaging period for the Jaw line (blue).
  • **jaw_shift**: Shift for the Jaw line.
  • **teeth_period**: Averaging period for the Teeth line (red).
  • **teeth_shift**: Shift for the Teeth line.
  • **lips_period**: Averaging period for the Lips line (green).
  • **lips_shift**: Shift for the Lips line.
  • **ma_method**: Moving Average averaging method (ENUM_MA_METHOD).
  • **applied_price**: Applied price (ENUM_APPLIED_PRICE).
  • **mode**: Indicator line index. MODE_UPPER (upper histogram) or MODE_LOWER (lower histogram).
  • **shift**: Index of the value from the indicator buffer (shift relative to the current bar).
  • Returned Value

  • double: Numerical value of the Gator oscillator.
  • Notes

    The oscillator displays the difference between the Alligator red and blue lines (upper histogram) and between red and green lines (lower histogram).

    Example

    double diff = iGator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_UPPER, 1);
    

    Related Indicators

  • [iFractals](/indicators/ifractals)
  • [iIchimoku](/indicators/iichimoku)
  • Platform Support

  • MQL4 Language
  • MetaTrader 4 Trading Platform
  • Constants Reference

  • [ENUM_TIMEFRAMES](/constants/chartconstants/enum_timeframes)
  • [ENUM_MA_METHOD](/constants/indicatorconstants/enum_ma_method)
  • [ENUM_APPLIED_PRICE](/constants/indicatorconstants/prices)
  • [Indicator Line Identifiers](/constants/indicatorconstants/lines) (e.g., MODE_UPPER, MODE_LOWER)