HELP PLEASE. How can I get my EA to read an interger created by a custom indicator, using ObjectSetText

 

Hi there

My Custom Indicator creates an interger, and displays it on the window using the ObjectSetText function.

It displays it as a graphical object, so I can not call it direcly from the iCustom...... code.

This is how the Indicator displays the number

ObjectSetText("cur_score", DoubleToStr(MathRound(ld_16), 0)

The number appears in the window, but my EA can not read it.

I have tried the following code in my EA, with no success

Print (OBJ_TEXT,"cur_score");

Print (ObjectGet("cur_score",OBJ_TEXT));

Print (ObjectGetShiftByValue("cur_score",OBJ_TEXT));

I some how need the EA to read the value, (as an integer) of the "cur_score".

Any help greatly appreciated

Regards

David

 
theveeb:

Hi there

.....

What type of object did you make? OBJ_TEXT or OBJ_LABEL
ObjectGet can call only the Price & Time or pixel coordinates of the Objects I mentioned. Afaik, You can't call the text description of an object.
When you create the object; store the value into a global variable or into an IndexBuffer and call that variable's value.

regards
cameofx

 

Thanks for that. That explains why I can't retrieve the value of the number in the text. I will modify the indicator. Regards