|
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.
|