It is not obvious what would be the "Numerical value of the specified custom indicator", The value might be in this case are number in AroonUpBuffer and AroonDnBuffer, Since these are 2 separate arrays, I don't understand how to calculate this.
When you call iCustom(), you specifiy the "mode value," or "Line index value," which specifies which buffer.
Per the documentation: "Can be from 0 to 7 and must correspond with the index, specified in call of the SetIndexBuffer() function."
In your case, these are:
SetIndexBuffer(0, AroonUpBuffer);
SetIndexBuffer(1, AroonDnBuffer);
So:
double val=iCustom(NULL,0,"Aroon Up & Dn",14, false, false, 0,0);
Gives you the current value of buffer 0, i.e. AroonUpBuffer[].
Per the documentation: "Can be from 0 to 7 and must correspond with the index, specified in call of the SetIndexBuffer() function."
No longer limited to 8 buffers. Can't remember the limit, think that it may be 256 or 512. Whatever it is it is far more than I will ever use.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
From the technical documentation of iCustom
https://docs.mql4.com/indicators/icustom
It is said that the return value is "Numerical value of the specified custom indicator"
Returned 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.
Example:
double val=iCustom(NULL,0,"SampleInd",13,1,0);
However, i don't get what does it mean by "Numerical value of the specified custom indicator"
Consider the source code of this Aroon_Up_Down.mq4
It is not obvious what would be the "Numerical value of the specified custom indicator", The value might be in this case are number in AroonUpBuffer and AroonDnBuffer, Since these are 2 seperate array, I don't understand how to calculate this.
I want to understand how this is calculate since the problems i am trying to solve is to Eliminate the use of ICustom and embeded the indicator calculation logic inside the EA directly so people who get the EA can use it directly without having to install any additional indicators so it would be much more eaiser to use.