From the ObjectSetText() documentation:
Note For objects of OBJ_TEXT and OBJ_LABEL, this description is shown as a text line in the chart. 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. |
From the ObjectSetText() documentation:
Note For objects of OBJ_TEXT and OBJ_LABEL, this description is shown as a text line in the chart. 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. |
Thanks Drazen, so would my solution be along the lines of ObjectCreate(name,OBJ_TEXT.... and then would ObjectSetText work?
Yes, besides trend line, put OBJ_TEXT or OBJ_LABEL and you will be able to change font and color of the text.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi folks,
I'm editing an indi that prints the previous sessions High & Low & plots them as horizontal trendlines, I'm trying to edit the text that is associated with each line.
The changes I make to the ObjectSetText line don't seem to have any bearing on the format of the text, wondering what I'm doing wrong?
Currently the text defaults in colour to the MT4 'foreground' colour, and strangely the text size is quite big (about 10-12).