Page 1 of 1

Error on Close()

Posted: Mon Sep 12, 2016 11:47 pm
by forexcepat
hi guys

i need help frm you guys
im working some strategy, and when i want to get the candle stick close its return 0 zero

i try to print the return of the 'Close(0)' and it still zero

anyone can help me please?

my code look like this :

horizontalLineValue := ObjectGet('myline', OBJPROP_PRICE1);
lastCandleClose := close(1);

//AskUser(StrPriceType(horizontalLineValue));
Print('LineValue');
Print(FloatToStr(horizontalLineValue));
Print('LastCandle');
Print(FloatToStr(close(1)));

thx for you help guys
any answered will be appreciated