thanks for this
one question please,
how to call it from the iCustom() function
I want to use it in an EA
- reference information
-
MQL4 Exampe
// Return Value:Numerical value of the specified custom indicator.
//The custom indicator must be compiled (*.EX4 file) and be in the terminal_directory\MQL4\Indicators\ directory.
double val=iCustom(NULL, //Symbol name on the data of which the indicator will be calculated. NULL means the current symbol.
0,//It can be any of ENUM_TIMEFRAMES enumeration values. 0 means the current chart timeframe.
"MACDChannels",//Custom indicator compiled program name, relative to the root indicators directory (MQL4/Indicators/). If the indicator is located in subdirectory, for example, in MQL4/Indicators/Examples, its name must //be specified as "Examples\\indicator_name" (double backslash "\\"must be specified as separator instead of a single one).
12,26,9,//Custom indicator input-parameters, separated by commas.
//The passed parameters and their order must correspond with the declaration order and the type of extern variables of the custom indicator.
//If the values of input parameters is not specified, the default values will be used.
1, Line index. Can be from 0 to 7 and must correspond with the index, specified in call of the SetIndexBuffer() function.
0); //Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
MACDChannels:
This indicator shows MACD in the main chart.
Author: XueFei Xiong