PureBytes Links
Trading Reference Links
|
A much faster version that uses no loops (except for initialization) can
be found at
http://unicorn.us.com/trading/src/_LinRegSlopeSFC.txt
The only thing that really needs to be changed (in both versions)
is to move the NumericRef parameters to the beginning of the list
of inputs. TS2000i often fails to set NumericRefs properly if they
aren't listed first.
> Study : sve.lr
> Last Edit : 8:16 PM 7/2/2004
> Provided By : Sergey Efremov
> Description : Calculates the slope and intercept of the
> linear regression of Price2 with respect to Price1.
> Outputs the current value of the regression together with
> Intercept and Slope:
>
> Price2[k]=Intercept+Slope*Price1[k]
-Alex
|