how to add text label to rectangle box edge?

 

hello

i want to add specific text label to rectangle box edge .

this is part of source code what i found and want to add specific text like "Support Line".

               ObjectCreate(s,OBJ_RECTANGLE,0,0,0,0,0);

               ObjectSet(s,OBJPROP_TIME1,t1);

               ObjectSet(s,OBJPROP_PRICE1,BuferDn1[i]);

               ObjectSet(s,OBJPROP_TIME2,t2);

               ObjectSet(s,OBJPROP_PRICE2,p2);

               ObjectSet(s,OBJPROP_STYLE,rect_style);

               ObjectSet(s,OBJPROP_WIDTH,zonewidth);

               ObjectSet(s,OBJPROP_COLOR,c);

               ObjectSet(s,OBJPROP_BACK,true);

if anyone help me much appreciate.

 
james272:

hello

i want to add specific text label to rectangle box edge .

this is part of source code what i found and want to add specific text like "Support Line".

               ObjectCreate(s,OBJ_RECTANGLE,0,0,0,0,0);

               ObjectSet(s,OBJPROP_TIME1,t1);

               ObjectSet(s,OBJPROP_PRICE1,BuferDn1[i]);

               ObjectSet(s,OBJPROP_TIME2,t2);

               ObjectSet(s,OBJPROP_PRICE2,p2);

               ObjectSet(s,OBJPROP_STYLE,rect_style);

               ObjectSet(s,OBJPROP_WIDTH,zonewidth);

               ObjectSet(s,OBJPROP_COLOR,c);

               ObjectSet(s,OBJPROP_BACK,true);

if anyone help me much appreciate.

ObjectSetString(s,OBJPROP_TEXT,"Your Text");
 
amando:

i applied but it return error like 

'ObjectSetString' - no one of the overloads can be applied to the function call SD_HTFS_SupplyDemand v7.mq4 608 22"

and i tried with this but it not print anything on the chart.

would you check it ? thanks

ObjectSetString(0, s,OBJPROP_TEXT,"Your Text");