ChartNavigate problem in EA

 

Hello all,

I have an EA which shifts the chart around using the ChartNavigate function. It's been working for months, but since downloading the update today it doesn't work properly.

I can demonstrate the problem with the following code, an EA (turn off the auto scroll before putting it on a chart):

#property strict

int OnInit()
  {
   Print(ChartNavigate(0,CHART_END,-50));
  
   return(INIT_SUCCEEDED);
  }

The code is supposed to shift the current chart to 50 bars from the right most end of the chart. It prints the result of ChartNavigate.

If I put this ea on a M15 chart, it works as intended, and prints "true" in the experts tab, but if I change the timeframe, say to H1, it doesn't work: it just shifts the chart all the way to the most recent data, and prints "false" in the experts tab. If I then change the chart back to M15, it still does not work, and prints "false".

It doesn't seem to work as intended again until you open a new chart. Not even removing the EA from the chart and putting it back on again returns normal functionality.

Am I missing something or is there some sort of bug with ChartNavigate?

Many thanks

 

Edit:

I can confirm that Build 1031 did NOT exhibit this behaviour, but Build 1045 does. 

Try contacting the Service Desk 

 
honest_knave:

I can confirm that Build 1031 did NOT exhibit this behaviour, but Build 1045 does. 

(There's widespread related bugs in v1045 - see https://www.mql5.com/en/forum/168768/page3#comment_4062335 onwards, if you haven't already done so)
 
JC:
(There's widespread related bugs in v1045 - see https://www.mql5.com/en/forum/168768/page3#comment_4062335 onwards, if you haven't already done so)
It does look fairly widespread. Thanks for the link
 
thanks for the replies