|
Description |
This formula returns the square of the coefficient R. |
|
|
Formula |
RSquared_1(instrument, Length, targetBar)=begin RSquared = coeffR(instrument, Length, targetBar) ^ 2 end |
|
|
Parameters |
instrument An instrument.
Length The coeffR formula calculates an average. The Length parameter defines the length of the average.
targetBar The bar, as oriented with the current bar, you want to evaluate. |
|
|
Return Value |
The square of the correlation coefficient R |
|
|
Examples |
RSquared(SERIES, Period=10, Smooth=1)=begin SquareR = 0 AvgSqrR = 0 start = 0 finish = Period total = 0 average = 0
if Period > 0 then begin while start < finish do begin total = total + vchart(RSquared_1(SERIES, Period, start)[(start - 1)]) start=start+1 end average = total / Period end retval = Scale(average,TEN_THOUSANDTHS) end |
|
|
Comments |
|
©2008 Aspen Research Group, Ltd. All rights reserved. Terms of Use.