How could I position a Text using absolute coordinates?

How to create strategies and indicators
Message
Author
turner22
Posts: 1
Joined: Thu Jul 12, 2012 5:28 pm

How could I position a Text using absolute coordinates?

#1 Postby turner22 » Thu Jul 12, 2012 5:40 pm

Dear All,

I tried the below code but it did not work:

ObjectCreate("Main_Trend", obj_Text, 0,Time(0), High(0));
ObjectSet("Main_Trend", OBJPROP_SCREENCOORDS,1);
ObjectSetText("Main_Trend", "Long", 12, "Arial", clBlue);
ObjectSet("Main_Trend", OBJPROP_XDISTANCE,50);
ObjectSet("Main_Trend", OBJPROP_YDISTANCE,50);

What is wrong with that?

Thanks,
Cs

KelvinHand
Posts: 103
Joined: Sun Jan 02, 2011 6:05 pm

Re: How could I position a Text using absolute coordinates?

#2 Postby KelvinHand » Fri Jul 13, 2012 9:10 pm

turner22 wrote:Dear All,

I tried the below code but it did not work:

ObjectCreate("Main_Trend", obj_Text, 0,Time(0), High(0));
ObjectSet("Main_Trend", OBJPROP_SCREENCOORDS,1);
ObjectSetText("Main_Trend", "Long", 12, "Arial", clBlue);
ObjectSet("Main_Trend", OBJPROP_XDISTANCE,50);
ObjectSet("Main_Trend", OBJPROP_YDISTANCE,50);

What is wrong with that?

Thanks,
Cs



ObjectCreate('Main_Trend', obj_Text, 0, 0, 0);
ObjectSet('Main_Trend', OBJPROP_SCREENCOORDS,1);
ObjectSetText('Main_Trend', 'Long', 12, 'Arial', clBlue);
ObjectSet('Main_Trend', OBJPROP_TIME1,50);
ObjectSet('Main_Trend', OBJPROP_PRICE1,50);

ObjectSet('Main_Trend', OBJPROP_VALIGNMENT, tlBottom);
ObjectSet('Main_Trend', OBJPROP_HALIGNMENT, taRightJustify);

ObjectSet('Main_Trend', OBJPROP_SCRVALIGNMENT, SVA_TOP);
ObjectSet('Main_Trend', OBJPROP_SCRHALIGNMENT, SHA_RIGHT);


http://forextester.com/forum/viewtopic.php?t=2595


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 22 guests