I would like to create an indicator that just draws a Path Drawing that starts from the first bar of a session and ends at the last bar of the session. Essentially I would like to only connect Highs and Lows. I have attached a photo of how I would like the finished product to look.
The purple version shows how the points of the path will move as the bas are printing live but the blue version shows what the finished product should look like. The second bar in the series has to print with either a Higher High(HH) & Low(HL) or a Lower High(LH) & Low(LL) compared to the first bar to place the first point. If it is not achieved, the first point will not be placed until it happens. In these examples, the path starts by going down. The first point is made when the bar makes its first LH & LL in Bar [62]. The next bar must only have a LL to continue the trend regardless if it also has a HH, these conditions only move the point. These examples can be seen in bars [63], [67] & [69]. The only way the line reverses, in which case a new point is formed, is if a HH & HL appears as shown in bars [64], [66], [74], [80], [88], [91], [5] , [15], or a LH & LL seen in bars [65], [71], [75], [84], [89], [3], [12]. A point will not be moved or created if the current Bar's H & L finishes between the prev. Bar's H & L as seen in bars [81], [82], [6], [7], [8]. A new drawing will always begin at the start of the trading session.
Some advice, or examples on how to approach creating an automatically updating drawing on screen, specifically with the Path drawing tool would be greatly appreciated.​

Comment