MQL4 Reference Technical Indicators iStdDev

iStdDev

Calculates the Standard Deviation indicator and returns its value.

double  iStdDev(
   string       symbol,           // symbol
   int          timeframe,        // timeframe
   int          ma_period,        // MA averaging period
   int          ma_shift,         // MA shift
   int          ma_method,        // MA averaging method
   int          applied_price,    // applied price
   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]  Moving Average period.

ma_shift

[in]  Moving Average shift.

ma_method

[in]  Moving Average method. 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.

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 Standard Deviation indicator.

Example:

  double val=iStdDev(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,0);