Value of trendline
            
                 06 Sep 2013, 14:05
            
                    
Hello,
is it possible to read the actual value of a trendline in a chart window? I could not find any access functions.
Does anybody have a suggestion how to build a work-around for this problem?
Replies
                     juan.calmet
                     30 Jun 2020, 01:11
                                    
Please cTrader give attention to this. What is the solution for accessing the values of Trendline in the chart?????
The only thing I can find is Chart.FindAllObjects(ChartObjectType.TrendLine)
but with this I only can retrieve Name,Comment,ObjectType,IsAlive,IsInteractive,Zindex; How can I get The CalculateY of the object ????
@juan.calmet
                     juan.calmet
                     30 Jun 2020, 01:37
                                    
I digged deep and found the solution!!!! CHEERS
   var lines = Chart.FindAllObjects<ChartTrendLine>();
            foreach (var line in lines)
            {
                Print(line.CalculateY(Bars.OpenTimes.Last(0)));
            }
@juan.calmet

cAlgo_Fanatic
09 Sep 2013, 16:38
RE:
Thomas said:
It is not possible at the moment but we have plans to implement such feature in the future.
@cAlgo_Fanatic