Page 1 of 1

ObjectExists problem

Posted: Tue Mar 15, 2016 4:10 pm
by erwu
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 ?

Re: ObjectExists problem

Posted: Thu Mar 17, 2016 7:53 am
by FX Helper
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