ObjectExists problem

How to create strategies and indicators
Message
Author
erwu
Posts: 1
Joined: Tue Mar 15, 2016 4:06 pm

ObjectExists problem

#1 Postby erwu » Tue Mar 15, 2016 4:10 pm

Hello
I create manually object from FT2 interface level, rename it to "DUPA",

Now I want to get properties of this object ( rectangle )

Code: Select all

SetCurrencyAndTimeframe("AUDUSD", 5);

if (! ObjectExists(vRectangle))
   Print("no Rectangle  ");

if (ObjectExists("DUPA") == true)
{
        Print("no Rectangle  ");
}


Why I can't access it ?

FX Helper
Posts: 1477
Joined: Mon Apr 01, 2013 3:55 am

Re: ObjectExists problem

#2 Postby FX Helper » Thu Mar 17, 2016 7:53 am

Hello

You need to use ObjectGet function.

Here is the example:
if (ObjectExists("HLine") == true)

price = ObjectGet("HLine", OBJPROP_PRICE1);

You can find more info in Forex Tester -> Help -> Indicators API


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 19 guests