Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
Here is the complete version of this formula, this version will give you a one when the formation occured.
{Double Bottom}
plot:=CLOSE;
PK:=Zig(plot,10,%)<Ref(Zig(plot,10,%),-1) AND Ref(Zig(plot,10,%),-1)>Ref(Zig(plot,10,%),-2);
TR:=Zig(plot,10,%)>Ref(Zig(plot,10,%),-1) AND Ref(Zig(plot,10,%),-1)<Ref(Zig(plot,10,%),-2);
TR1:=TroughBars(1,plot,10);
TR2:=TroughBars(2,plot,10);
(ValueWhen(1,TR,Ref(plot,-1))/ValueWhen(2,TR,Ref(plot,-1))> 1 AND ValueWhen(1,TR,Ref(plot,-1)) /
ValueWhen(2,TR,Ref(plot,-1))<1.06) AND TR2-TR1>=10 AND Cross(plot,ValueWhen(1,PK,Ref(plot,-1)))
{Double Top}
plot:=Close;
PK:=Zig(plot,10,%)<Ref(Zig(plot,10,%),-1) AND Ref(Zig(plot,10,%),-1)>Ref(Zig(plot,10,%),-2);
TR:=Zig(plot,10,%)>Ref(Zig(plot,10,%),-1) AND Ref(Zig(plot,10,%),-1)<Ref(Zig(plot,10,%),-2);
PK1:=PeakBars(1,plot,10);
PK2:=PeakBars(2,plot,10);
(ValueWhen(1,PK,Ref(plot,-1))/ValueWhen(2,PK,Ref(plot,-1))>0.94 AND
ValueWhen(1,PK,Ref(plot,-1)) / ValueWhen(2,PK,Ref(plot,-1))<1) AND
PK2-PK1>=10 AND Cross(ValueWhen(1,TR,Ref(plot,-1)),plot)
|
1 user thanked Patrick for this useful post.
|
|