New Bar Open Event doesn´t detect all bars on history data (Time gaps)

 

Hi,

I´m newbie at MQL4 and I am trying to detect an new bar open event, using daily timeframe, and I have tried my code and other several snipets that I have found on the forum like:

https://www.mql5.com/en/code/10370

https://www.mql5.com/en/forum/134278

https://www.mql5.com/en/forum/114228

https://www.mql5.com/en/forum/145119

https://www.mql5.com/en/forum/130549

I have tried to detect the event by looking for time[] and for the number of bars... but the problem is that when I'm testing my code just to alert me to the event i can see that are time gaps between the detection of the bars. Normaly it should detect a new bar everyday but sometimes just passes a month without any event alert! I have made some printscreens of the code and the journal history:

mql4 code

And the history alerts:

Journal_alerts

As you see there is as time gap between 2012.08 and 2012.10! And there are others but the bars exists in the graphics!

I don't understand... I have initialized the variables, made them global, and Ii have tried the others snipets too. The result was the same!

Can anybody explain how does this appends? Its a simple code...

Thanks for your help... Best regards.

 
dbarnabe:


As you see there is as time gap between 2012.08 and 2012.10! And there are others but the bars exists in the graphics!

Read some of today's posts/threads . . . fro example: https://www.mql5.com/en/forum/146589
 
RaptorUK:

Read some of today's posts/threads . . . fro example: https://www.mql5.com/en/forum/146589

Thanks a lot RaptorUK,

The data is all in the Log! :) I was just searching for "new bar events" and I should search for other subjects.

I have learned this lesson!

 
dbarnabe:

Thanks a lot RaptorUK,

The data is all in the Log! :) I was just searching for "new bar events" and I should search for other subjects.

I have learned this lesson!

Reason: