trouble handing timing

 

Hello every one,

Has anyone seen this problem or know how to fix it!!!!!!!!! I am setting a global variable to store previous Time and then update with new time to make sure i get one execution in at the start of the bar. (I believe this is a common practice) But for some reason, it does not remember the new time and my EA is executed many times with in a bar. Ony one know about this issue??????????? Thanks,

 
Never mind. I got it fixed. Thanks.
Reason: