End Points of a Linear Regression with Standard Deviations
MetaStock Indicator

In MetaStock 5.x for Windows and higher there is a way to plot the end points of a linear regression line with channels +/- 2 Standard Deviations.

Here are the three formulas:

*Linear Regression (14)

(14 * Sum(Cum(1) * C,14) - Sum(Cum(1),14)* Sum(C,14)) /(14 * Sum(Pwr(Cum(1),2),14) - Pwr(Sum(Cum(1),14),2)) * Cum(1) + (Mov(C,14,S) - Mov(Cum(1),14,S) * (14 * Sum(Cum(1) * C,14) - Sum(Cum(1),14) * Sum(C,14))/(14 * Sum(Pwr(Cum(1),2),14) - Pwr(Sum(Cum(1),14),2)))
 
*Linear Regression Lower Band

Fml( "*Linear Regression (14)" ) - 2* Stdev( Fml( "*Linear Regression (14)" ) ,14)
 
*Linear Regression Upper

Fml( "*Linear Regression (14)" ) + 2* Stdev( Fml( "*Linear Regression (14)" ) ,14)
 
 
 



  

 

ASX Data   ASX Real Time Data   MetaStock                                                 © Copyright 2004 Paritech Pty Ltd | Contact | Shopping Cart | Licence | Member Login | Privacy Policy