LH-LL/HL-HH Confirmation Trend Line

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:
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".
Skript med en öppen källkod

I sann TradingView-anda har författaren till detta skript publicerat det som öppen källkod, så att handlare kan förstå och verifiera det. Skål för författaren! Du kan använda den gratis men återanvändning av den här koden i en publikation regleras av våra Ordningsregler. Du kan göra den till favorit för att använda den i ett diagram.

Vill du använda det här skriptet i ett diagram?


This indicator is a game changer man. When I have the money I'll give you some coin because this is phenomenal. I can't say that of many things here.
informanerd SoAmusing777
@SoAmusing777, Thank you very much. I received your encouragement already. If you think so, I may work on making it better, and I welcome your opinions.
SoAmusing777 informanerd
@informanerd, Awesome :) Honestly, I'm not sure what to add. It auto adjusts the lines and if I wanna see multiple time frame i just click the other time frame up above rather than having all the lines in one place on one time frame. still, it would be cool to have two timeframes of lines at a time and be able to set their color to differentiate from them.
informanerd SoAmusing777
@SoAmusing777, Of course! I've had some issues combining 2 time frames, but I'll work on that for sure. Thanks.
SoAmusing777 informanerd
@informanerd, My pleasure!
trust me. this is the only indicator i have come to love on tradingview. Thanks so much, though it has some few lapses, its able to catch the trend so early to secure a good profit. i have studied it for almost four days now. i would like to know how to turn on the multi-time frame.
informanerd benzerkess
@benzerkess, My pleasure! To see trend lines from other time frames, click on the indicator "Settings" button and then change the "Time Frame" option. Note that the trend lines from other time frames may not be as precise as expected for now.
SoAmusing777 benzerkess
@benzerkess, There's a few more that I love, but you're not wrong. This indicator is insanely incredible. I thought you might be overstating it. You're not. For me, I prefer to just switch between the time frames up top. It's easier than having a bunch of lines on 1 time frame chart. I already have the setting to draw multiple lines.
beautiful thank you!!!
informanerd Nick.TkgProfits
@Nick.TkgProfits, You're welcome!