PureBytes Links
Trading Reference Links
|
Hello List,
I seem to have slapped together the following 1-day (EOD) ATR for intraday
use.
MktStart:=DayOfWeek()<>Ref(DayOfWeek(),-1);
yestHi:= Ref(HighestSince(1,MktStart,H),-1);
yestLo:= Ref(LowestSince(1,MktStart,L),-1);
yesH:=ValueWhen(1,MktStart,yestHi);
yesL:=ValueWhen(1,MktStart,yestLo);
yesC:=ValueWhen(2,DayOfWeek()<>Ref(DayOfWeek(),-1),Ref(C,-1));
IntATR=If((yesH-yesL)>Abs(yesC-yesH)) AND ((yesH-yesL)>Abs(yesC-yesL)),
(yesH-yesL),
If( Abs(yesC-yesH)>Abs(yesC-yesL),
Abs(yesC-yesH),
Abs(yesC-yesL)
)
);
IntATR
Any idea how to make it simpler? It seems to take ages trying to test this
on 1-minute data :-((
Also, any idea how to elegantly obtain multi-period ATR, eg. ATR(7).
All I can think of is tremendous formulas with extensive use of PREV,
Valuewhen etc.
Thanks, all the best
Yarroll
***
http://republika.pl/yarroll999/
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|