Value of trendline

Created at 06 Sep 2013, 14:05
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TH

Thomas

Joined 06.09.2013

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?

 


@Thomas
Replies

cAlgo_Fanatic
09 Sep 2013, 16:38

RE:

Thomas said:

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?

It is not possible at the moment but we have plans to implement such feature in the future.


@cAlgo_Fanatic

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