MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Technical indicators  iEnvelopesOnArray

 
double iEnvelopesOnArray( double array[], int total, int ma_period, int ma_method, int ma_shift, double deviation, int mode, int shift)
Calculation of the Envelopes indicator on data stored in a numeric array. Unlike iEnvelopes(...), the iEnvelopesOnArray function does not take data by symbol name, timeframe, the applied price. The price data must be previously prepared. The indicator is calculated from left to right. To access to the array elements as to a series array (i.e., from right to left), one has to use the ArraySetAsSeries function.
Parameters:
array[]   -   Array with data.
total   -   The number of items to be counted.
ma_period   -   Averaging period for calculation of the main line.
ma_method   -   MA method. It can be any of Moving Average method enumeration value.
ma_shift   -   MA shift. Indicator line offset relate to the chart by timeframe.
deviation   -   Percent deviation from the main line.
mode   -   Indicator line index. It can be any of Indicators line identifiers enumeration value.
shift   -   Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Sample:
  double val=iEnvelopesOnArray(ExtBuffer, 0, 13, MODE_SMA, 0.2, MODE_UPPER,0 );