thanx. really problem. we'll fix it

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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