So" i = Bars - counted_bars - 1;" is ok when IndicatorCounted() is not -1;
I dont know exactly what would cause IndicatorCounted() to return -1 but it is usually coded to be an error. Perhaps if there are no bars in the chart ....
I dont know exactly what would cause IndicatorCounted() to return -1 but it is usually coded to be an error. Perhaps if there are no bars in the chart ....
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
vx0532:
So" i = Bars - counted_bars - 1;" is ok when IndicatorCounted() is not -1;
I dont know exactly what would cause IndicatorCounted() to return -1 but it is usually coded to be an error. Perhaps if there are no bars in the chart ....
if( counted_bars < 0 ) return(-1);
I dont know exactly what would cause IndicatorCounted() to return -1 but it is usually coded to be an error. Perhaps if there are no bars in the chart ....
if( counted_bars < 0 ) return(-1);
Ok, Thanks!