PureBytes Links
Trading Reference Links
|
Hi
I am looking to coding a swing line such that it ignores the opening
and closing price(except on an outside day)and merely looks at the
total range for the day. The swing goes to the extreme of price each day.
This is what I have found so far:
H1:= HIGH;
H2:= Ref(H1,-1);
L1:= LOW;
L2:= Ref(L1,-1);
A1:= H1 > H2 AND L1 >= L2; {Rally}
B1:= H1 <= H2 AND L1 < L2; {Reaction}
C1:= H1 > H2 AND L1 < L2; {Outside}
D1:= A1+B1+C1=0; {Inside}
E1:=If(D1 OR Inside(),PREV,
If(C1 AND PREV>Ref(MP(),-1),HIGH,
If(C1 AND PREV<Ref(MP(),-1),LOW,
If(B1,L,If(A1,H,PREV)))));
F1:=If(MP()<E1,
HighestSince(1,MP()>E1,H),
LowestSince(1,MP()<E1,L));
SW:= Zig(F1,0.0001,%);
SW;
However if you look at the chart of BSL(Bluescope Steel ASX)on the 9th
Feb 2004 it fails to allocate the high on that day as a swing high
because the next day(10th Feb 2004) had a higher high. But this next
day (10th Feb 2004) also had a lower low than the 9th Feb 2004. So I
want this swing line to acknowledge the swing high on the 9th Feb 2004
and then to acknowledge the swing low on the 10th Feb 2004 even though
the high on the 10th Feb 2004 had a higher high than the high on the
9th Feb 2004.Does that make sense?
Hope someone can help
Cheers
Norman
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/
|