alexgrover

Rolling Linear Regression Channel

Compute a rolling linear regression channel, the value of the bands at a precise point in time is equal to the last value of the corresponding extremity of a regression channel of equal length and mult at that point. The bands are made by adding/subtracting the RMSE of a linear regression to a least-squares moving average.

Settings

  • Length : Period of the indicator
  • Mult : Multiplication factor for the RMSE, determine the distance between the upper and lower extremities
  • Src : Input data for the indicator
  • Gradient : Determine if the area within the bands must be filled with a gradient, a color closer to blue indicates that src is close/superior to the upper band while a color closer to red indicates that src is close/inferior to the lower band. True by default, if false no filling is applied.

Usage

The indicator can be used like any other band indicator. Because the indicator makes use of the LSMA we can expect the bands to be more reactive to price changes, the indicator can also be more accurate when the bands must act as support and resistance as long as the underlying trend in the price is linear.


In blue/red the indicator, with the Bollinger bands in dark green with the same length/ mult settings.

Since the indicator is derived from the linear regression channel indicator it can also be used to look at how drastically the regression channels changed over time, that is if the bands look linear, then it implies that the channel didn't change a lot with the arrival of new closing prices.

Details

As said the last value of each band is equal to the last value of the corresponding extremity of a linear regression channel.


In blue/red the indicator, with the linear regression channel in orange with the same length/ mult settings, the last circle of the upper band is equal to the last value of the upper regression channel, same thing with the lower band, you can see this more clearly using the replay mode.

Notes

Thx to the twitter fans for their feedback and support, note that I often ask about feedback or about what kind of indicators I should do next on Twitter .
Remove from Favorite Scripts Add to Favorite Scripts
Patreon: https://www.patreon.com/alexgrover

Become a Patreon and get access to exclusive technical indicators!

You can also check out some of the indicators I made for luxalgo : https://www.tradingview.com/u/LuxAlgo/#published-scripts

Comments

Nice, loved the use of gradient, I always learn something new here haha. Thank you ^^
+2 Reply
@Owl, No more boring plots! Gradient everywhere! xD Thx a lot for the support and glad you learned something, next indicators will be even better (I hope so)
+3 Reply
Hi Alex, Thanks for sharing another Great Work!!!!!!!! Love it!!!!!!!!
+1 Reply
alexgrover sudhir.mehta
@sudhir.mehta, Thx :D
Reply
Another incredible script <3
+1 Reply
alexgrover syrinxflunki
@syrinxflunki, Really glad to hear you say it :D Thx
Reply
syrinxflunki alexgrover
@alexgrover, Honestly I could applaud your work for hours... :D
Reply
nice! I love it. also can you do new indicator for the wedge pattern? (rising/falling) I am happy to pay:)
+1 Reply
alexgrover Bearishness
@Bearishness, Thx, I'll see what I kind do with the "wedge" pattern, but I am not a pattern guy.
Reply
Bearishness alexgrover
@alexgrover, alright, channel and wedge are similar but bit different:) I believe in you!:)
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out