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

Re: [EquisMetaStock Group] Average True Range



PureBytes Links

Trading Reference Links

Many thanks for the good job Roy!
If I want other periods of ATR , i simple change that,
in that point?

{A;} {ATR(6);}
{B;} {ATR(5);}
LONG:=(B*0.6)+K;
SHORT:=K-(A*0.6);
LONG;SHORT;


Thank you in advanced

--- Roy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
> Does this help?
> 
> Roy
> 
> > LONG:=ATR(5)*0.6+C;
> > SHORT:=C-(ATR(6)*0.6);
> > LONG;SHORT;
> >
> > I have this indicator , for daily charts.
> >
> > I need the numbers that produces that indicator,
> to use them in
> > intraday charts.
> >
> > Does anybody have any idea, how i can fix it?
> 
> 
>   {Modified Daily ATR}
>   {for use on intraday charts}
>   {© 2004 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
> N:=Input("Daily ATR for 5 and 6 Periods",6,6,6);
> X:=1/N;
> A:=Input("Hour of Last Daily Bar"  ,0,23,16);
> B:=Input("Minute of Last Daily Bar",0,59,00);
> Q:=Input("Display Mode,  0=Static  1=Dynamic 
> 2=Test",0,2,2);
>   {0=Display, update at last bar of day}
>   {1=Display, update on each new bar}
>   {2=Backtest, update on first bar of new day}
> G:=LastValue(Highest(Sum(DayOfWeek()<>
>    ValueWhen(2,1,DayOfWeek()),5))=5);
> I:=DayOfMonth()<>ValueWhen(2,1,DayOfMonth());
> M:=G OR I;
> F:=G OR (Hour()=A AND Minute()=B);
> A:=LastValue(Cum(1)-1)=Cum(1);
> B:=LastValue(Cum(1))=Cum(1);
> J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
> J:=If(A+LastValue(J)>2 OR B+Q=2,1,(B=0)*J);
> J:=If(G,1,If(Q=2 OR Cum(J)<=1,M*2,J));
> Ho:=HighestSince(1,M,H);
> Ho:=ValueWhen(1,J,If(J=1,Ho,ValueWhen(2-G,1,Ho)));
> Lo:=LowestSince(1,M,L);
> Lo:=ValueWhen(1,J,If(J=1,Lo,ValueWhen(2-G,1,Lo)));
> K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
> Ho:=ValueWhen(1,Ho>0,Ho); Hi:=ValueWhen(2,J,Ho);
> Lo:=ValueWhen(1,Lo>0,Lo); Li:=ValueWhen(2,J,Lo);
> K:=ValueWhen(1,K>0,K); Ci:=ValueWhen(2,J,K);
> R:=Max(Max(Abs(Ci-Lo),Abs(Ci-Ho)),Ho-Lo);
> A:=If(Cum(J>0)<N+1,Cum((J>0)*R)/N,
> ValueWhen(1,J,PREV)*(1-X)+R*X);
> A:=If(ValueWhen(N+1,J,A)>0,A,A);
> B:=If(Cum(J>0)<N,Cum((J>0)*R)/(N-1),
> ValueWhen(1,J,PREV)*(1-(1/(N-1)))+R*(1/(N-1)));
> B:=If(ValueWhen(N,J,B)>0,B,B);
> {A;} {ATR(6);}
> {B;} {ATR(5);}
> LONG:=(B*0.6)+K;
> SHORT:=K-(A*0.6);
> LONG;SHORT;
> 
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/equismetastock/

<*> 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/