İş tamamlandı
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
İş Gereklilikleri
Looking to develop an indicator that plots line for every distinct high/lows. Upon successfully plotting, the lines shall be drawn and extended until encountering a new candle in the future. 2 scenarios can happen here:
a) the line meets a candle that engulfs through the line, in this case the line shall stop there.
b) the line meets and get "wicked" by another distinct high/low and in this case, the line shall stop there as well. For highs, rename and display name of the line as (ChartTimeframe + " Topped"). the name shall be display above the line. For lows, rename as (ChartTimeframe + " Bottomed"). The name shall be displayed below the lines. NOTE: only display the names for this scenario. Do not show name when it meets another candle.
Finally, a line delete function that deletes all the lines except for scenario B.
The attached indicator contains ALL The source code for all the function above, so it is merely a copy/paste + some very simple structuring of the code.
This indicator, upon attached to a chart, can be activated by pressing "Q", and clicking onto any area of the chart. What it does is, from the place you clicked, the period is derived and the lines shall be drawn 200 candles to the left. What i would be expecting is using the same source code, use "Q" as drawing lines and use "W" as deletion unnecessary lines(scenario A). Feel free to play around with the indicator. Source code shall be provided for selected programmer.
Image A showing example of what would happen when "Q" is pressed and clicked onto a chart
Image B showing what it should looked like upon pressing "W" and clicked onto the chart. Do note that lines that have yet to encounter any candles in the future shall remain extended.
As emphasized, source code is provided upon being selected. But pls download and play around the indicator to have a feel on it. The current indicator does not have the "encountering" a candle logic yet. But the checks for distinct high/low wicking another distinct high/low is in place already. The code for pressing a keystroke and clicking on chart is also made available for you to use