Skip to content

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.

FunctionReturns the indicator value
iACAccelerator Oscillator
iADAccumulation/Distribution
iADXAverage Directional Index
iAlligatorAlligator
iAOAwesome Oscillator
iATRAverage True Range
iBearsPowerBears Power
iBandsBollinger Bands®
iBandsOnArrayCalculation of Bollinger Bands® indicator on data, stored in a numeric array
iBullsPowerBulls Power
iCCICommodity Channel Index
iCCIOnArrayCalculation of Commodity Channel Index indicator on data, stored in a numeric array
iCustomCustom indicator
iDeMarkerDeMarker
iEnvelopesEnvelopes
iEnvelopesOnArrayCalculation of Envelopes indicator on data, stored in a numeric array
iForceForce Index
iFractalsFractals
iGatorGator Oscillator
iIchimokuIchimoku Kinko Hyo
iBWMFIMarket Facilitation Index by Bill Williams
iMomentumMomentum
iMomentumOnArrayCalculation of Momentum indicator on data, stored in a numeric array
iMFIMoney Flow Index
iMAMoving Average
iMAOnArrayCalculation of Moving Average indicator on data, stored in a numeric array
iOsMAMoving Average of Oscillator (MACD histogram)
iMACDMoving Averages Convergence-Divergence
iOBVOn Balance Volume
iSARParabolic Stop And Reverse System
iRSIRelative Strength Index
iRSIOnArrayCalculation of Momentum indicator on data, stored in a numeric array
iRVIRelative Vigor Index
iStdDevStandard Deviation
iStdDevOnArrayCalculation of Standard Deviation indicator on data, stored in a numeric array
iStochasticStochastic Oscillator
iWPRWilliams’ 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.

FunctionAction
ChartIndicatorAddAdd an indicator with the specified handle into a specified chart window
IndicatorReleaseDelete an indicator handle and release its calculation part if unused
Last updated on