View Single Post
  #15 (permalink)  
Old 02-08-2008, 07:38 PM
mimi's Avatar
mimi mimi is offline
Member
 
Join Date: Apr 2006
Posts: 40
mimi is on a distinguished road
hi
**** Linear Time Regression: Coefficient of Correlation (r) ****
Indicator Name : "LinTimeRegr"
Input Parameters:
TimeSeries=[Close or Open or High or Low]
RegressionPeriods= Integer Value(must be >= 3 )

Calculation:

[ n * sum(X*Y) - sum(X) * sum(Y) ] /sqrt ( [n * sum(X*X) - sum(X) * sum(X)] * [n * sum(Y*Y) - sum(Y) * sum(Y)] )

where
sum(X*X) = sum of X*X over the last n periods
sum(Y*Y) = sum of Y*Y over the last n periods

sum(X*Y) = sum of X*Y over the last n periods
sum(X) = sum of X over the last n periods
sum(Y) = sum of Y over the last n periods

X = Period Number
Y = Time Series
n = Regression Periods

**** Linear Time Regression: Coefficient of Correlation (r) ****

Last edited by mimi; 02-08-2008 at 07:47 PM.
Reply With Quote