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
How to get all horizontal lines on a chart from an indicator
- 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
Hi Henry,
Here is an example:
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.
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)
Also you can use pre-built Trendline_LE / Trendline_SE signal as an example.