TradingView
ImmortalFreedom
Aug 6, 2019 12:56 AM

Enhanced Linear Regression Trend Channel 

PNC Financial Services Group, Inc. (The)NYSE

Description

This is my PSv4.0 enhanced version of "Linear Regression Channel", as it is more commonly known. I entitled it Enhanced Linear Regression Trend Channel, simply because it seems more accurate as a proper description. However, this is actually a dual linear regression channel all-in-one Swiss army knife, nicely packaged within 104 lines of code. The primary one tracks in real-time, while the secondary, with an enabled "time warp" setting, is displayed monitoring the linear regression channel in the past for comparison, providing fully adjustable tandem tracking capabilities. It seemed like a superb novel idea to me to add this capability for super analytical approaches. The Pearson correlation displays in the rear middle of the primary linear regression trend channel. I did this because during a steep uptrend zoomed in, it often moves off the chart being placed on the bottom and is no longer visible for a while. Additionally, for the second time, I am releasing my "Neon Source" plot feature in a bright stunning yellow corona. Charts these days have so many plots on them, so I devised a unique way to resolve any confusion by emulating neon light. You may still easily use candles with this neon line too, or just simply disable it if you wish.

Features List Includes:
Enable/disable dark background for enhanced visibility
Dual "Source" selections
Dual "Period" adjustments
Dual "Deviation(s)" adjustments
Dual "Time Warp" adjustments
Dual selectable line extension method
"Pearson Correlation" color change selection for enhancing visual acuity amongst other indicators
Secondary "Linear Regression Trend Channel" time warped with enable/disable capability
"Neon Source" has a brightness control with an enable/disable capability

This is not a freely available indicator, FYI. To witness my Pine poetry in action, properly negotiated requests for unlimited access, per indicator, may ONLY be obtained by direct contact with me using TV's "Private Chats" or by "Message" hidden in my member name above. The comments section below is solely just for commenting and other remarks, ideas, compliments, etc... regarding only this indicator, not others. If you do have any questions or comments regarding this indicator, I will consider your inquiries, thoughts, and ideas presented below in the comments section, when time provides it. When my indicators achieve more prevalent use by TV members, I will implement more ideas when they present themselves as worthy additions. As always, "Like" it if you simply just like it, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!

Release Notes

I added two more inner companion lines of regression to the primary linear regression channel, but these are a bit more dynamic. I don't know what to call them exactly, but "dyno-ranging regressive levels" is an attempt to put the new feature into words. I wasn't too thrilled with the ordinary deviation of the upper and lower channels as they commonly exist, so I mentally experimented with some ideas arriving at a unique result that seems analytically favorable with it's characteristics. With the primary linear regression channel only, I included an option so that you may show both sets simultaneously OR just the inner dyno-ranging lines alone OR just the standard levels by themselves. Other changes are primarily significant variable renaming with the new code so I can understand it better with the additions.
Comments
JPH_XV
Interested in buying, please message me
ImmortalFreedom
@SAB_XV, No need to, my "Quadratic Regression Trend Channel" supersedes this one, and every subscribing member has the freedom to use that other one as they please... This indicator is deprecated.
JPH_XV
@ImmortalFreedom, thanks mate. Greatly appericated
maikaomagamm
I would like to test it, I can't send a private message, I'm very interested
harshv61
Hi, can I get a demo of this script for a while? If it turns good with my test, I will pay for it.

Thank you.
enn36
Hi there, I'm using your LRTC script. Is the enhanced only for paid users?
ImmortalFreedom
@enn36, Yes, You will have to contact me directly via chat for further current details.
Pratik_4Clover
"I wasn't too thrilled with the ordinary deviation of the upper and lower channels as they commonly exist, so I mentally experimented with some ideas arriving at a unique result that seems analytically favorable with it's characteristics"

If possible, pleas tell what do you mean? You mean now lower and upper bands are not calculated using SD?
ImmortalFreedom
@OWL, Sorry I didn't have time to write about it in full detail, but now that you ask I shall elaborate. In the image above, you will notice two sets of red/green primary channels. The inner channels are using standard deviation too, but I'm using data different from what is typically used. Also there is more than one one type of standard deviation. At this time I would wish to keep that detailed information proprietary, inspiring others to tinker with "ordinary" linear regression channel, if they so choose.

When I initially tried out my experiment, I noticed it dynamically changes the inner channels when reversing trend often towards two deviations just like the primary outer channels. However, when there is a new trend forming the inner lines have a tendency to to move inwards towards one deviation. This is displayed above. As you can see, a heavy downward spiral has been ensuing. The outer channels have significant gaps between them and the close, while the inner channels have tightened up closer to one deviation. In addition to that, when a good clean long term trend has formed, you will see the primary and secondary channels are correlated and often are visually parallel.

With all that said, you now may surmise why I entitled it properly by deservedly adding "Trend" to the name. You can blatantly see the former trend with the pink/blue secondary channels, while also seeing trend fluctuations when it is in motion with the primary channels in comparison. I would also like to explain that any one of the three channel sets is enable/disable capable in the indicator settings panel, allowing the user to use multiple combinations of the three combined to their liking.
More