informanerd

LH-LL/HL-HH Confirmation Trend Line

informanerd Updated   
Based on Dow Theory, a series of successive higher highs (HH) and higher lows (HL) is the sign of an uptrend (bull trend) and a series of successive lower highs (LH) and lower lows (LL) is the sign of a downtrend (bear trend).
So this script indicates the trends using the concept and draws corresponding trend lines.
It took some effort to make it possible for users to see as many trend lines as they wish. Eventually the user could set the number alongside some other options in the indicator settings.
Use the script and send me your thoughts!
Release Notes:
Fixed some line calculation bugs!
Release Notes:
- A tweak to the line calculations!
Release Notes:
Fixed another line calculation bug!
Release Notes:
- Added Multi-TimeFrame Capability
Now users could check trend lines from other time frames on the current chart. Trend lines from other time frames may not be as precise as expected on the current time frame, but they are useful for sure.
Release Notes:
- Cleaned the code!
Release Notes:
- Added an output signal which might be used as external source in other indicators; '1' means "Uptrend", '-1' means "Downtrend" and '0' means "No Detected Trend".
To use the feature you can see this: www.tradingview.com/...o-another-indicator/
Or if you are a Pine coder, you can use the external source in your scripts by adding some line like the following to your code:
xSrc = input(close, "External Source")
and then change the source in your indicator settings to "LH-LL/HL-HH Trend: Plot".
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

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.

Want to use this script on a chart?