Value of Trend line Object at last close

 

 Im trying to find the value of a Trend line Object at last close. Can anyone help? 

double ExtMapBuffer4 =  ObjectGetValueByTime(0,OBJ_TREND,TimeCurrent(),0);

 
gouki1001:

 Im trying to find the value of a Trend line Object at last close. Can anyone help? 

double ExtMapBuffer4 =  ObjectGetValueByTime(0,OBJ_TREND,TimeCurrent(),0);

Use the name of the trendline

 
Keith Watford:

Use the name of the trendline

 ExtMapBuffer4[y] =  ObjectGetValueByTime("LL_"+Step,OBJ_TREND,TimeCurrent(),0); This is what Im using but something is wrong somewhere. 

 
gouki1001:

 ExtMapBuffer4[y] =  ObjectGetValueByTime("LL_"+Step,OBJ_TREND,TimeCurrent(),0); This is what Im using but something is wrong somewhere. 

Where is the chart ID?