MQL4 Reference Technical Indicators

Technical Indicator Functions

A group of functions intended for calculation of standard and custom indicators.

For an Expert Advisor (or any other MQL4 program) to take up the value of any indicator, it is not necessary that this indicator is present in the chart. The requested indicator will be loaded and calculated in the thread of the module that has called it.

Any indicator can be calculated on the data of not only current chart, but also on the data of any available symbol/period. If data (symbol name and/or timeframe differ from the current ones) are requested from another chart, the situation is possible that the corresponding chart was not opened in the client terminal and the necessary data must be requested from the server. In this case, error ERR_HISTORY_WILL_UPDATED (4066 - the requested history data are under updating) will be placed in the last_error variable, and one will has to re-request (see example of ArrayCopySeries()).

All indicator functions have at least 2 parameters - symbol and period. The NULL value of the symbol means the current symbol, the 0 value of the period means the current timeframe.

Function

Returns the indicator value

iAC

Accelerator Oscillator

iAD

Accumulation/Distribution

iADX

Average Directional Index

iAlligator

Alligator

iAO

Awesome Oscillator

iATR

Average True Range

iBearsPower

Bears Power

iBands

Bollinger Bands®

iBandsOnArray

Calculation of Bollinger Bands® indicator on data, stored in a numeric array

iBullsPower

Bulls Power

iCCI

Commodity Channel Index

iCCIOnArray

Calculation of Commodity Channel Index indicator on data, stored in a numeric array

iCustom

Custom indicator

iDeMarker

DeMarker

iEnvelopes

Envelopes

iEnvelopesOnArray

Calculation of Envelopes indicator on data, stored in a numeric array

iForce

Force Index

iFractals

Fractals

iGator

Gator Oscillator

iIchimoku

Ichimoku Kinko Hyo

iBWMFI

Market Facilitation Index by Bill Williams

iMomentum

Momentum

iMomentumOnArray

Calculation of Momentum indicator on data, stored in a numeric array

iMFI

Money Flow Index

iMA

Moving Average

iMAOnArray

Calculation of Moving Average indicator on data, stored in a numeric array

iOsMA

Moving Average of Oscillator (MACD histogram)

iMACD

Moving Averages Convergence-Divergence

iOBV

On Balance Volume

iSAR

Parabolic Stop And Reverse System

iRSI

Relative Strength Index

iRSIOnArray

Calculation of Momentum indicator on data, stored in a numeric array

iRVI

Relative Vigor Index

iStdDev

Standard Deviation

iStdDevOnArray

Calculation of Standard Deviation indicator on data, stored in a numeric array

iStochastic

Stochastic Oscillator

iWPR

Williams' Percent Range

 

What's new in MQL5

In MQL5, the number of built-in technical indicators has been increased from 30 to 38. The indicators are generated and managed using handles to avoid unnecessary copies and reduce memory consumption. For the same purpose, new functions for working with indicators and timeseries are presented — they allow receiving indicator values in entire arrays rather than by a single value.

New functions have been added for working with indicators. Among them are ChartIndicatorAdd() and IndicatorRelease() ones for dynamic adding and removal of indicators when creating complex technical analysis tools.

Function

Action

ChartIndicatorAdd

Add an indicator with the specified handle into a specified chart window

IndicatorRelease

Delete an indicator handle and release its calculation part if unused