Download MetaTrader 5

Use of ObjectGetValueByTime

To add comments, please log in or register

I'm trying to get values on lines of an OBJ_CHANNEL created on chart.

As far as I understand it, I would be able to get them with ObjectGetValueByTime 

However, I'm nor figuring how to... 

This is what I'm using for

   Upper = ObjectGetValueByTime(0,trend,i1,0);
   Lower = ObjectGetValueByTime(0,trend,i1,1);
//--- Output values in three lines
   Comment(StringFormat("Show Trend Channel Values\nUpper = %G\nLower = %G\nSpread = %d",Upper,Lower,Spread));

 where trend is the string with channel name and i1 is the time I want to get line values.

The values I get for Upper value is ok, but not for Lower value. This last one comes with 6 digits and no decimal place

Thank you for the help you can provide me.

Best regards.

--- Version 4, Build 910 (Broker did not updated yet?)

To add comments, please log in or register