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.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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);