How to give a name to the horizontal lines with label? - page 2

 

You can set a text to a horizontal line this way:

 string S1text = "S1";
 datetime time = [HORIZONTAL LINE TIME];
 double price = [HORIZONTAL LINE PRICE];
 ObjectCreate(0,S1text, OBJ_TEXT, 0, time, price, time + PeriodSeconds(), price);
 ObjectSetString(0,S1text,OBJPROP_TEXT, "Hello"); 
    

You're welcome :)

 
ObjectCreate(0,"name", OBJ_TEXT, 0, time[0], price );
ObjectSetString(0,"name",OBJPROP_TEXT, "Hello");