-
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post the indicator or a link to the exact version.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem -
handle = iCustom(_Symbol, 0, "tsN");
Check your return codes, and report your errors (including market prices and your variables). Don't look at GLE/LE unless you have an error. Don't just silence the compiler (MT5/MT4+strict), it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum (2012)
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles (2014) -
CopyBuffer(handle, 4, 0, 25, cHigh);
Perhaps your indicator doesn't have five (5) buffers.
int CopyBuffer( int indicator_handle, // indicator handle int buffer_num, // indicator buffer number int start_pos, // start position int count, // amount to copy double buffer[] // target array to copy );
Parameters
indicator_handle
[in] The indicator handle, returned by the corresponding indicator function.
buffer_num
[in] The indicator buffer number.
start_pos
[in] The position of the first element to copy.
count
[in] Data count to copy.
start_time
[in] Bar time, corresponding to the first element.
stop_time
[in] Bar time, corresponding to the last element.
buffer[]
[out] Array of double type.
Return Value
Returns the copied data count or -1 in case of an error.
- 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
I am just starting with mql5 , However I have plenty of experience in mql4.
but for some reason I am stuck at reading buffer values of a custom indicator in mql5
this is my code :
Can't figure out why the cHigh[] size is always zero.
Indicator buffers: