PureBytes Links
Trading Reference Links
|
Roy,
A linear regression line is the same as the end point moving average.
( 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 ) ) )
In the formula above the periods are 14 and the price field is the
close.
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
wrote:
> Hi All,
>
> Does anyone know the MetaStock formula (not the function syntax)
for Linear
> Regression. I'd like to rebuild it so that I can use my own
composite data
> array. Alternatively I'd like to be able to create a data array
that has a
> custom indicator value replacing one CLOSE. This replacement will
always
> occur at the same relative position in the array (most recent bar),
but for
> backtesting purposes must be able to recalculate on every bar.
>
> Any thoughts would be very much appreciated.
>
> Roy
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|