iGator
iGator
Calculates the Gator oscillator and returns its value.
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
[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 method enumeration value.
- applied_price
[in] Applied price. It can be any of Applied price enumeration values.
- mode
[in] Indicator line index. It can be any of Indicators line identifiers enumeration value.
MODE_UPPER - upper histogram, MODE_LOWER - lower histogram.
- 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 Gator oscillator.
Note
The oscillator displays the difference between the Alligator red and blue lines (the upper histogram) and that between red and green lines (the lower histogram).
Example:
double diff=iGator(NULL,0,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_UPPER,1);