logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
NedKelly  
#1 Posted : Sunday, April 23, 2006 10:09:46 PM(UTC)
NedKelly

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/17/2006(UTC)
Posts: 10

Does anyone have any code for detecting Flags and Pennants?
patoche  
#2 Posted : Saturday, April 29, 2006 2:10:58 PM(UTC)
patoche

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 2/19/2005(UTC)
Posts: 17

MetaStock exploration for system to detect flag and pennant patterns Column A Name: Price Formula: C Column B Name: Pole Top Formula: zz:=Zig(C,17,%); X:=BarsSince(ZZ < Ref(ZZ,-1)AND Ref(ZZ,-1) > Ref(ZZ,-2)); X1:=LastValue(X)+1; c2:=Ref(HHV(C,(2+X1)),-1);C2 Column C Name: Pole Bot Formula: zz:=Zig(C,17,%); X:=BarsSince(ZZ < Ref(ZZ,-1)AND Ref(ZZ,-1) > Ref(ZZ,-2)); X1:=LastValue(X)+1; C3:=Ref(LLV(C,26),-X1);C3 Column D Name: Pole % Formula: zz:=Zig(C,17,%); X:=BarsSince(ZZ < Ref(ZZ,-1)AND Ref(ZZ,-1) > Ref(ZZ,-2)); X1:=LastValue(X)+1; c2:=Ref(HHV(C,(2+X1)),-1); c3:=Ref(LLV(C,26),-X1); POLE:=(C2-C3)/C3*100;POLE Column E Name: Target % Formula: zz:=Zig(C,17,%); X:=BarsSince(ZZ < Ref(ZZ,-1)AND Ref(ZZ,-1) > Ref(ZZ,-2)); X1:=LastValue(X)+1; c2:=Ref(HHV(C,(2+X1)),-1); c3:=Ref(LLV(C,26),-X1); POLE:=(C2-C3)/C3*100; TARGET:=1.94* Power(pole ,.724);TARGET Column F Name: Target Price Formula: zz:=Zig(C,17,%); X:=BarsSince(ZZ < Ref(ZZ,-1)AND Ref(ZZ,-1) > Ref(ZZ,-2)); X1:=LastValue(X)+1; c2:=Ref(HHV(C,(2+X1)),-1); c3:=Ref(LLV(C,26),-X1); POLE:=(C2-C3)/C3*100; TARGET:=1.94* Power(pole ,.724); (1+TARGET/100)*C Filter Column A is the prebreakout price, column B is the highest point on the flag pole, column C is the pole base, column D is the % pole height, column E is the target % profit, and column F shows the target price. All prices are on a closing basis. Columns B-F are not essential for running the exploration, but they will help to calculate your exit price target.
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.