How to know the time of a bar?

 

I want to use them in function below and try to creat a trendline.

bool ObjectCreate( string name, int type, int window, datetime time1, double price1, void time2, void price2, void time3, void price3)

 
Time[]
//or
iTime()
 
qjol:

Thank you very much.