How to get all horizontal lines on a chart from an indicator

Questions about MultiCharts .NET and user contributed studies.
uprz23
Posts: 12
Joined: 27 Oct 2012
Has thanked: 2 times

How to get all horizontal lines on a chart from an indicator

Postby uprz23 » 05 Aug 2022

Hi,

I'd like to create an indicator that would read in all the horizontal lines drawn by hand on a chart.

If the price is near any of the lines, I want to take some kind of action.

Thanks,
Henry

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: How to get all horizontal lines on a chart from an indicator

Postby Svetlana MultiCharts » 11 Aug 2022

Hi Henry,

Here is an example:

Code: Select all

IEnumerable<ITrendLineObject> lines = DrwTrendLine.GetTrendLineObjects(EDrawingSource.AnyTechOrManual); foreach (ITrendLineObject drw in lines){ if (drw.Begin.Price == drw.End.Price)
Then you can introduce your condition describing what to do with horizontal lines.

Also you can use pre-built Trendline_LE / Trendline_SE signal as an example.


Return to “MultiCharts .NET”