ObjectGetValueByShift possible bug

 
Hello,

I have created an object of type OBJ_TREND and it draws a line exactly where I want it. Each bar, I query ObjectGetValueByShift (myObjectName,1) to get the value of the line at the last closed bar.

When the slope of the trend line is fairly flat, it seems to give me the right results but when the line is more vertical, the value returned is very wrong - often 10 pips out.

Am I using the function incorrectly or is there an error in the trend calculation?

If I calculate the value based on the two initial points, I do get the right value.

Any help would be appreciated.

Hugh
 
thanx. really problem. we'll fix it
Reason: