I have writen an Expert Advisor with the following code lines:
Print("Minute: ", TimeToStr(Time), " LastMinuteTime: ", TimeToStr(lastMinuteTime));
if(lastMinuteTime != Time)
lastMinuteTime = Time;
I put this EA on the EURUSD M1 Chart and geht every tick the following lines:
2011.07.19 03:59:23 EA_Test EURUSD,M1: Minute: 2011.07.19 03:53 LastMinuteTime: 2011.07.19 03:53
Also the function Minute() returns only once a time the right value, it is when I active the ea. After that, the value is always the same!
I put the function in the start() not in the init().
This part of what you copied from the Experts tab is your local PC time: 2011.07.19 03:59:23 EA_Test EURUSD,M1: and shows the date and time the entry was added to the Experts tab and log.
This part is what your print statement generated and is based on server time: Minute: 2011.07.19 03:53 LastMinuteTime: 2011.07.19 03:53
Your PC's clock is around 6 minutes fast . . .
@RaptorUK, this was only an example line, at PC-time 8:30:00 I got also the same statement.
I see, that functions Time and Minute() are in a while-loop. Is that the problem?? That I get the timeinfo only when I enter the start-function again??