How to convert Tick to Time

 
Does any one knows how to covert a Tick into a time frame?
Lets say that I am in 5M time frame and I am getting all ticks during these 5min.
How can I get Time or Price of the open value in M1 time frame? How can I determine which tick is it?

Time[0] shows constant time for M5 open time only and Ticks are numbered only and have no time assigned to them
Is there any function to do that.
 
Check TimeCurrent() - it is time of incoming tick. https://docs.mql4.com/dateandtime/timecurrent
Returns the last known server time (time of incoming of the latest quote) as number of seconds elapsed from 00:00 January 1, 1970.

Note: At the testing, the last known server time is modelled.
 
See iTime() iOpen()
 

See iTime() iOpen()



phy, now when Rosh suggested to use the TimeCurrent(), I can use your suggestion.

However, my problem was from where to get the time.

iTime() requires index and at M5 only M5 index is available which is "0"
iOpen() requires time and only time available is bar time Time[0]

So thanks guys.
 
Think about it some more, because those two functions are what you will use.
 
 
What does it do?
 
// open price of current 1m bar

price = iOpen(Symbol(), PERIOD_M1, 0); 

// open time of current 1m bar

time = iTime(Symbol(), PERIOD_M1, 0);

 


 
It looks that you are correct phy.
-thanks
Reason: