- iAC
- iAD
- iADX
- iADXWilder
- iAlligator
- iAMA
- iAO
- iATR
- iBearsPower
- iBands
- iBullsPower
- iCCI
- iChaikin
- iCustom
- iDEMA
- iDeMarker
- iEnvelopes
- iForce
- iFractals
- iFrAMA
- iGator
- iIchimoku
- iBWMFI
- iMomentum
- iMFI
- iMA
- iOsMA
- iMACD
- iOBV
- iSAR
- iRSI
- iRVI
- iStdDev
- iStochastic
- iTEMA
- iTriX
- iWPR
- iVIDyA
- iVolumes
Technical Indicator Functions
All functions like iMA, iAC, iMACD, iIchimoku etc. create a copy of the corresponding technical indicator in the global cache of the client terminal. If a copy of the indicator with such parameters already exists, the new copy is not created, and the counter of references to the existing copy increases.
These functions return the handle of the appropriate copy of the indicator. Further, using this handle, you can receive data calculated by the corresponding indicator. The corresponding buffer data (technical indicators contain calculated data in their internal buffers, which can vary from 1 to 5, depending on the indicator) can be copied to a mql5-program using the CopyBuffer() function.
You can't refer to the indicator data right after it has been created, because calculation of indicator values requires some time, so it's better to create indicator handles in OnInit(). Function iCustom() creates the corresponding custom indicator, and returns its handle in case it is successfully create. Custom indicators can contain up to 512 indicator buffers, the contents of which can also be obtained by the CopyBuffer() function, using the obtained handle.
There is a universal method for creating any technical indicator using the IndicatorCreate() function. This function accepts the following data as input parameters:
- symbol name;
- timeframe;
- type of the indicator to create;
- number of input parameters of the indicator;
- an array of MqlParam type containing all the necessary input parameters.
The computer memory can be freed from an indicator that is no more utilized, using the IndicatorRelease() function, to which the indicator handle is passed.
Note. Repeated call of the indicator function with the same parameters within one mql5-program does not lead to a multiple increase of the reference counter; the counter will be increased only once by 1. However, it's recommended to get the indicators handles in function OnInit() or in the class constructor, and further use these handles in other functions. The reference counter decreases when a mql5-program is deinitialized.
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 handle of the indicator: |
---|---|
Accelerator Oscillator |
|
Accumulation/Distribution |
|
Average Directional Index |
|
Average Directional Index by Welles Wilder |
|
Alligator |
|
Adaptive Moving Average |
|
Awesome Oscillator |
|
Average True Range |
|
Bears Power |
|
Bollinger Bands® |
|
Bulls Power |
|
Commodity Channel Index |
|
Chaikin Oscillator |
|
Custom indicator |
|
Double Exponential Moving Average |
|
DeMarker |
|
Envelopes |
|
Force Index |
|
Fractals |
|
Fractal Adaptive Moving Average |
|
Gator Oscillator |
|
Ichimoku Kinko Hyo |
|
Market Facilitation Index by Bill Williams |
|
Momentum |
|
Money Flow Index |
|
Moving Average |
|
Moving Average of Oscillator (MACD histogram) |
|
Moving Averages Convergence-Divergence |
|
On Balance Volume |
|
Parabolic Stop And Reverse System |
|
Relative Strength Index |
|
Relative Vigor Index |
|
Standard Deviation |
|
Stochastic Oscillator |
|
Triple Exponential Moving Average |
|
Triple Exponential Moving Averages Oscillator |
|
Williams' Percent Range |
|
Variable Index Dynamic Average |
|
Volumes |