MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Object functions  ObjectSetText

 
bool ObjectSetText( string name, string text, int font_size, string font=NULL, color text_color=CLR_NONE)
Changes the object description. For objects of OBJ_TEXT and OBJ_LABEL, this description is shown as a text line in the chart. If the function succeeds, the returned value will be TRUE. Otherwise, it is FALSE. To get the detailed error information, one has to call the GetLastError() function.
Parameters of font_size, font_name and text_color are used for objects of OBJ_TEXT and OBJ_LABEL only. For objects of other types, these parameters are ignored.
See also ObjectDescription() function.
Parameters:
name   -   Object name.
text   -   A text describing the object.
font_size   -   Font size in points.
font   -   Font name.
text_color   -   Text color.
Sample:
ObjectSetText("text_object", "Hello world!", 10, "Times New Roman", Green);