apparently its because of (line_id //line_number). i tried 0, OBJ_TRENDBYANGLE, and some other numbers, but it is useless and return value for all of bars is zero, please help on.
The ObjectGetValueByTime() function fails totally for Trendline by angle (OBJ_TRENDBYANGLE). Unfortunately MetaQuotes has not recognized the bug nor have they attempted to fix it.
As far as i know it never existed for that particular object type so i don't think it's a bug if it was never implemented.
I could be wrong though but i never found any reference that it existed in the documentation either.
Hello it's not possible to get the angle directly like that but in stead you can use use ObjectGetDouble() with OBJPROP_PRICE from the points and then calculate the difference that way.
As far as i know it never existed for that particular object type so i don't think it's a bug if it was never implemented.
I could be wrong though but i never found any reference that it existed in the documentation either.
Is a bug because the documentation states that it is supported.
Note
The function uses a synchronous call, which means that the function waits for the execution of all commands that have been enqueued for this chart prior to its call, that is why this function can be time consuming. This feature should be taken into account when working with a large number of objects on a chart.
An object can have several values in one price coordinate, therefore it is necessary to specify the line number. This function applies only to the following objects:
- Trendline (OBJ_TREND)
- Trendline by angle (OBJ_TRENDBYANGLE)
- Gann line (OBJ_GANNLINE)
- Equidistant channel (OBJ_CHANNEL) - 2 lines
- Linear regression channel (OBJ_REGRESSION) - 3 lines
- Standard deviation channel (OBJ_STDDEVCHANNEL) - 3 lines
- Arrowed line (OBJ_ARROWED_LINE)
That is what the OP is using but it has not worked ever. It is a bug which as never been fixed.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I have a problem with value of Trend_Line_By_Angle function. I can't get value of slope on any bars. I saw some same difficulties on forum, but none of answers could help me.
apparently its because of (line_id //line_number). i tried 0, OBJ_TRENDBYANGLE, and some other numbers, but it is useless and return value for all of bars is zero, please help on.