array out of range in iHighest???

Report any bugs with the Tickstory Lite software here. Please give as much detail as possible so the issue can be identified and resolved as soon as possible.
Post Reply
fenky
Posts: 3
Joined: Wed Dec 09, 2015 9:00 am

array out of range in iHighest???

Post by fenky »

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.

tickstory
Posts: 4884
Joined: Sun Jan 06, 2013 12:27 am

Re: array out of range in iHighest???

Post by tickstory »

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.

fenky
Posts: 3
Joined: Wed Dec 09, 2015 9:00 am

Re: array out of range in iHighest???

Post by fenky »

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 ^_^"

tickstory
Posts: 4884
Joined: Sun Jan 06, 2013 12:27 am

Re: array out of range in iHighest???

Post by tickstory »

Hi Fenky - thanks for letting us know how you solved it!

Regards.

Post Reply