dear support
got a strange result on High[iHighest(NULL,5,MODE_HIGH,30,0);] ---> The iHighest value is -1 on initialization
and High[] got error ---> array out of range ..
how can i result this issue , because iHighest is -1 . but i use backrest on mt4 built in ,it;s work well.
array out of range in iHighest???
Re: array out of range in iHighest???
Hi Fenky,
You might want to refer to the MQL manual for answers to this. A brief look at the manual suggests -1 indicates an error which you will need to use GetLastError to determine what is causing it:
https://docs.mql4.com/series/ihighest
Hope this helps.
You might want to refer to the MQL manual for answers to this. A brief look at the manual suggests -1 indicates an error which you will need to use GetLastError to determine what is causing it:
https://docs.mql4.com/series/ihighest
Hope this helps.
Re: array out of range in iHighest???
dear support:
i found solution in https://www.mql5.com/en/forum/127460
but i'm not use indicator , and i put code :
int counterd_bars=IndicatorCounted();
if(counterd_bars<0) return(-1);
and issue was result tks ^_^"
i found solution in https://www.mql5.com/en/forum/127460
but i'm not use indicator , and i put code :
int counterd_bars=IndicatorCounted();
if(counterd_bars<0) return(-1);
and issue was result tks ^_^"
Re: array out of range in iHighest???
Hi Fenky - thanks for letting us know how you solved it!
Regards.
Regards.