MQL4参考 技术指标 iEnvelopes

iEnvelopes

Calculates the Envelopes indicator and returns its value.

double  iEnvelopes(
   string       symbol,           // symbol
   int          timeframe,        // timeframe
   int          ma_period,        // MA averaging period
   int          ma_method,        // MA averaging method
   int          ma_shift,         // moving average shift
   int          applied_price,    // applied price
   double       deviation,        // deviation (in percents)
   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.

ma_period

[in]  Averaging period for calculation of the main line.

ma_method

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

ma_shift

[in]  MA shift. Indicator line offset relate to the chart by timeframe.

applied_price

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

deviation

[in]  Percent deviation from the main line.

mode

[in]  Indicator line index. It can be any of Indicators line identifiers enumeration value (0 - MODE_MAIN, 1 - MODE_UPPER, 2 - MODE_LOWER).

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 Envelopes indicator.

Example:

  double val=iEnvelopes(NULL,0,13,MODE_SMA,10,PRICE_CLOSE,0.2,MODE_UPPER,0);