There are several nice Linear Regression Channel scripts in the Public Library. and I tried to make one with some extra features too. This one can check if the Price breaks the channel and it shows where is was broken. Also it checks the momentum of the channel and shows it's increasing/decreasing/equal in a label, shape of the label also changes. The line colors change according to direction.
using the options, you can;
- Set the Source (Close, HL2 etc)
- Set the Channel length
- Set Deviation
- Change Up/Down Line colors
- Show/hide broken channels
- Change line width
meaning of arrows:
⇑ : Uptrend and moment incresing
⇗ : Uptrend and moment decreasing
⇓ : Downtrend and moment incresing
⇘ : Downtrend and moment decreasing
⇒ : No trend
An example for how color of lines, arrow direction and shape of label change.
Example: Fibonacci Levels
-> Up trend
-> Down trend
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.