DISPLAYING TEXT ON A CHART

 

I am trying to display text on a chart but no luck so far. I will appreciate any suggestions.

The following "Comment" and "ObjectCreate" code compiles ok but do not work?

Comment("THIS IS A COMMENT");

if(!ObjectCreate("label_object", OBJ_LABEL, 0, 0, 0))

{

Print("error: can't create label_object! code #",GetLastError());

return(0);

}

ObjectSet("label_object", OBJPROP_XDISTANCE, 200);

ObjectSet("label_object", OBJPROP_YDISTANCE, 100);

ObjectSetText("label_object", "Hello world!", 10, "Times New Roman", Green);

 
   ObjectCreate("ObjName", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("ObjName","your Text",7, "Verdana", Red);
   ObjectSet("ObjName", OBJPROP_CORNER, 0);
   ObjectSet("ObjName", OBJPROP_XDISTANCE, 20);
   ObjectSet("ObjName", OBJPROP_YDISTANCE, 20);
try this :)
 
old_man:
   ObjectCreate("ObjName", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("ObjName","your Text",7, "Verdana", Red);
   ObjectSet("ObjName", OBJPROP_CORNER, 0);
   ObjectSet("ObjName", OBJPROP_XDISTANCE, 20);
   ObjectSet("ObjName", OBJPROP_YDISTANCE, 20);
try this :)

IT WORKED!!!!

Thanks a bunch Old Man. I will start saving for your Christmas present.

 
joe:

IT WORKED!!!!

Thanks a bunch Old Man. I will start saving for your Christmas present.

im looking for the same thing. a simple text to display so i do not mix up the 6 MT4 instances i have on my VPS. do you generated the file ? if you could send that would be generous. thanks in advance

Reason: