How to calculate Linear Regression Channel?

Ahmed Abd El Aziz  

Hello

I want to draw "LINEAR REGRESSION CHANNEL" by my hand, so i want to know how to do this mathematically !!

Ahmed Abd El Aziz  
For ex:

Close 1 = 80.649
Close 2 = 80.685
Close 3 = 80.691

How to get the middle line value, upper line value and lower line value?

Daniel Cioca  
Sorry … I posted here earlier a link external with a better explanation of the linear regression… I see is gone… is it against the rules? 
Reason: