EA draw trendline from i highest to specific price but 10 candle advance

 
      double popen = iOpen(Symbol(),0,1);
  double PHighest = High[iHighest(Symbol(),0,MODE_HIGH,10,0)];
double PLowest  =  Low[iLowest(Symbol(),0,MODE_LOW,10,0)];

  
ObjectCreate("line",OBJ_TREND,0,Time[PHighest],PHighest,Time[-10],popen);
Where the fault error: Time[PHighest] need integer value, Time[-10] is it not possible, if i draw horizontal line in popen, can i get the point of Hline nad Tline cross point?
 
Hefajatur Rahman:

There is a good example here on how to correctly create the OBJ_TREND:


https://www.mql5.com/en/docs/constants/objectconstants/enum_object/obj_trend

Reason: