OPEN-SOURCE SCRIPT

trend lines v1 nguyenquy

70
The idea is to find Pivot Highs (PH) and Pivot Lows(PL) first.

Then, If current H is smaller then previous H (means no new higher high and possible downtrend) then draw trend line using them. and also it checks previous trend line (if exits) and if current angle is smaller then don't extend previous one.

Same idea when using Pivot Lows, If current L is higher then previous L (means no new lower low and possible uptrend) then draw trend line using them. and also it checks previous trend line (if exits) and if current angle is smaller then don't extend previous one.

Optionally style of old trend lines drawn as dashed.

Hope you enjoy it!

คำจำกัดสิทธิ์ความรับผิดชอบ

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.