PureBytes Links
Trading Reference Links
|
Hi Jose,
It perfectly works :):):)
As usual...
Thanks for your help
Regards,
Karile
Jose wrote:
>---8<--------------
>Pe:=Input("Periods",2,1000,21);
>
>x:=Mov(Typ(),20,S);
>Z:=LastValue(LinearReg(x,Pe));
>Y:=LastValue(Cum(1))-Cum(1);
>U:=Z-(LastValue(LinRegSlope(x,Pe))*Y);
>R:=0-(LastValue(Cum(1))-Pe);
>U+Ref(C,R)-Ref(C,R)
>---8<--------------
>
>j '-)
>
>
>--- In Metastockusers@xxxxxxxxxxxxxxx, karile <karile@xxxx> wrote:
>
>
>>Hi,
>>
>>I have a code which calculates a linear regression (see below).
>>
>>What I would like to have is a linear regression of a 20 SMA (
>>mov(typical(),20,s) ) instead of the close.
>>
>>Could anyone adjust the code below to perform that ?
>>
>>Here is the code :
>>
>>Pe:=Input("Periods",2,1000,6);
>>Z:=LastValue(LinearReg(C,Pe));
>>Y:=LastValue(Cum(1))-Cum(1);
>>U:=Z-(LastValue(LinRegSlope(C,Pe))*Y);
>>R:=0-(LastValue(Cum(1))-Pe);
>>U+Ref(C,R)-Ref(C,R);
>>
>>
>>Thanks for your help,
>>Regards,
>>
>>Karile
>>
>>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|