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)
|
Alright for an indicator that plots 1 for buy and -1 for sell use :
Bsetup:=Sum(C<Ref(C,-4),9)=9;
BCD:=HighestSince(1,Peak(1,Bsetup,.001),(C<Ref(L,-2)) + PREV);
BUY:=BCD-ValueWhen(1,Bsetup,BCD)=13 AND Ref(BCD-ValueWhen(1,Bsetup,BCD)=13,-1)<>1;
Ssetup:=Sum(C>Ref(C,-4),9)=9;
SCD:=HighestSince(1,Peak(1,Ssetup,.001),(C>Ref(H,-2)) + PREV);
SELL:=SCD-ValueWhen(1,Ssetup,SCD)=13 AND Ref(SCD-ValueWhen(1,Ssetup,SCD)=13,-1)<>1;
If(BUY,1,If(SELL,-1,0))
Patrick
|