Text Label Object

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

Text Label Object

#1 Postby plaforte » Thu Sep 17, 2009 12:35 am

Hello, after one hour, I just cannot figure how to change the displayed text with the command

ObjectCreate(IBName, obj_Text, 0, Time(0), High(0));
where IBName is the sting variable containing my object name. This works and itdisplays TEXT

I then try to set the text property with
ObjectSet(IBName, OBJPROP_TEXT, 'my text');
But I get a compiler errror saying incompatible type "double" and "string"

How can I change the TEXT displaied after using the ObjectCreate ?

Thank you

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

Re: Text Label Object

#2 Postby Terranin » Thu Sep 17, 2009 11:28 am

plaforte wrote:Hello, after one hour, I just cannot figure how to change the displayed text with the command

ObjectCreate(IBName, obj_Text, 0, Time(0), High(0));
where IBName is the sting variable containing my object name. This works and itdisplays TEXT

I then try to set the text property with
ObjectSet(IBName, OBJPROP_TEXT, 'my text');
But I get a compiler errror saying incompatible type "double" and "string"

How can I change the TEXT displaied after using the ObjectCreate ?

Thank you


Use function ObjectSetText instead.
Hasta la vista
Mike


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 13 guests