Technical Indicator Functions
All functions like iMA, iAC, iMACD, iIchimoku etc. created 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.
There is a universal method for creating any technical indicator using the IndicatorCreate() function. This function accepts the following data as 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.
Custom Indicators can contain up to 512 indicator buffers, and the buffer data also can be obtained by using the CopyBuffer() function, with the handle returned by function iCustom().
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 (better in OnInit(), since there is no function to free handles), 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 |
© 2000-2010, MetaQuotes Software Corp.
