Anyone know how to code : objectgetstring

Enivid

Administrator
Staff member
Nov 30, 2008
19,210
1,504
144
Odesa
www.earnforex.com
Yes, this is actually quite easy. You just need to give the chart number, object name, and object property name as the function's arguments.
For example, if you have a chart text object called TextObject with some text in it in the main chart window, you can use the following call:

MQL4:
string text = ObjectGetString(0, "TextObject", OBJPROP_TEXT);

This will return the text stored in the object.