what does iTime mean ?

 

Hello everybody,

as written in the subject it is my problem that i just can't figure out where that value iTime comes from.

For example I do this for the 5th Bar:

Print(" BarTime = ",iTime(NULL, 0, 5));

and i get this value

1321023600


but where does it come from? no hint in the documentation but smth about "time".

But what time. It doesnt look like month/day/year/hour/minute or else.

Is it the time (in minutes, seconds or even ticks) that passed since the first bar in the history since the 5th bar was finished?


Please enlighten me.

 

Read the documentation . . .

https://docs.mql4.com/dateandtime

"A group of functions providing the working with data of the datetime type (integer representing the amount of seconds elapsed from midnight, 1 January, 1970)."

 

Alright,

sorry didn't see that part.

So quite a historical value iTime() is.

:-)


Thank you

 
Print(" BarTime = ",iTime(NULL, 0, 5));
  1. iTime(NULL, 0, X) == Time[X]
  2. datetime now = Time[0];
    Print(" BarTime = ",TimeToStr(now, TIME_DATE|TIME_SECONDS);

Reason: