Topics
Forum Topics not found
Replies
juan.calmet
30 Jun 2020, 01:36
( Updated at: 21 Dec 2023, 09:22 )
RE: found the solution
FMogyi said:
Is it possible to get the price data where the object is at the specified time?
Here is the relevant MT4 code:
var lines = Chart.FindAllObjects<ChartTrendLine>();
foreach (var line in lines)
{
Print(line.CalculateY(Bars.OpenTimes.Last(0)));
}
@juan.calmet
juan.calmet
30 Jun 2020, 01:35
RE: Bro I found out how
var lines = Chart.FindAllObjects<ChartTrendLine>();
foreach (var line in lines)
{
Print(line.CalculateY(Bars.OpenTimes.Last(0)));
}
@juan.calmet
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