[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: linear regession



PureBytes Links

Trading Reference Links

--- In equismetastock@xxxxxxxxxxxxxxx, "stf" <drclic@xxxx> wrote:
> Hello,
> 
> I'm a rookie on metastock.
> I used to use medved quote tracker : there's a indicator 
call "linear
> regression canal " I think and I want to have this indicator in
> metastock.
> 
> Can anyone help me ? 
> 
> Thx in advance,
> 
> Stephane.
this is the true one i mean type as name:{Linear Regression true 
Slope v3.0 and  for the formula paste this:
 
 
pds:=
 Input("Linear Regression periods",2,2520,21);
pds1:=
 Input("Lin Reg Signal periods",1,2520,10);
hist:=Input("display positive histogram fill (on=1, off=0)",0,1,1);
display:=Input("display  0~100%=1,  0~90 degrees=2",1,2,1);
x:=Input("Open=1, High=2, Low=3, Close=4, Volume=5, P=6",1,6,4);
 
x:=If(x=1,O,If(x=2,H,If(x=3,L,
 If(x=5,V,If(x=6,P,C)))));
LRlast:=LinearReg(x,pds);
LRS:=LinRegSlope(x,pds);
LRprev:=LRlast-LRS;
{LRstart:=Ref(LRlast-LRS*(pds-1),pds-1);}
 
a:=Min(LRlast,LRprev)/Max(LRlast,LRprev);
LRratio:=(If(LRlast>LRprev,2-a,a)-1)*50;
LRSdeg:=If(LRratio<0,Atan(LRratio,1)-360,
 Atan(LRratio,1));
LRSper:=LRSdeg*10/9;
LRStrue:=If(display=2,LRSdeg,LRSper);
signal:=Mov(LRStrue,pds1,E);
odd:=Cum(1)/2=Int(Cum(1)/2);
 
If(hist=1 AND LRStrue>signal,
 If(odd,signal,LRStrue),LRStrue);
0;signal;LRStrue
> 
> 
_____________________________________________________________________
> Envie de discuter en "live" avec vos amis ? Télécharger MSN 
Messenger
> http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de 
France


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/BefplB/TM
---------------------------------------------------------------------~->

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/