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!
發布通知: Fixed some line calculation bugs!
發布通知: - A tweak to the line calculations!
發布通知: Fixed another line calculation bug!
發布通知: - 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.
發布通知: - Cleaned the code!
發布通知: - 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".

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。