How to get the text of an object

How to create strategies and indicators
Message
Author
plaforte
Posts: 11
Joined: Wed Aug 19, 2009 11:49 pm
Location: Singapore

How to get the text of an object

#1 Postby plaforte » Mon Oct 05, 2009 4:40 am

Hello, I misunderstand the use of ObjectGet. I would like to assign the text of an object to a string variable PABar. When I compile I get error message of uncompatible types string and double. I thought that the following would return a string which is the text of the object. How could I achieve what I want ?

PABar := ObjectGet('PA'+IntToStr(Counter1), OBJprop_TEXT);

Thank you

User avatar
Terranin
Site Admin
Posts: 833
Joined: Sat Oct 21, 2006 4:39 pm

Re: How to get the text of an object

#2 Postby Terranin » Mon Oct 05, 2009 10:06 am

plaforte wrote:Hello, I misunderstand the use of ObjectGet. I would like to assign the text of an object to a string variable PABar. When I compile I get error message of uncompatible types string and double. I thought that the following would return a string which is the text of the object. How could I achieve what I want ?

PABar := ObjectGet('PA'+IntToStr(Counter1), OBJprop_TEXT);

Thank you


You can not get text back, this function returns only double value. You can not assign double to string. You can set text to object but there is no function to get it back.
Hasta la vista
Mike


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 18 guests