Column C : V/V ave
Formula:
V/MOV(V,50,S)
Column D Stop Loss
Formula:
zz:=Zig(C,17,%);
X:=BarsSince(ZZ<Ref(ZZ,-1)AND Ref(ZZ,-1)>Ref(ZZ,-2));
X1:=LastValue(X);
Ref(LLV(L,X1),-1)
Column E Rew/Risk
Formula:
zz:=Zig(C,17,%);
X:=BarsSince(ZZ<Ref(ZZ,-1)AND Ref(ZZ,-1)>Ref(ZZ,-2));
X1:=LastValue(X)+1;X2:=LastValue(X);
c2:=Ref(HHV(C,(2+X1)),-1);
c3:=Ref(LLV(C,26),-X1);
POLE:=(C2-C3)/C3*100;
TARGET:=1.94* Power(pole ,.724); TARGETC:=(1+TARGET/100)*C;
STOPL:=Ref(LLV(L,X2),-1);
REW:=(TARGETC-C)/C;
RISK:=(C-STOPL)/C;
REW/RISK
Column F 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); (1+TARGET/100)*C
Filter
{Copyright Markos Katsanos 2005}
ZZ:=Zig(C,17,%);
X:=BarsSince(ZZ<Ref(ZZ,-1)AND Ref(ZZ,-1)>Ref(ZZ,-2));
X1:=LASTVALUE(X)+1; {flag duration}
X2:=X1+1;
SD:=Stdev(C,X2);
PERIOD:=22;
COEF:=.1;
INTRA:=Log(H)-Log(L);
VINTRA:=Stdev(INTRA,PERIOD);
INTER:=Log(Typical())-Log(Ref(Typical(),-1));
VINTER:=Stdev(INTER,PERIOD);
CUTOFF:=COEF*(VINTER+VINTRA)*C;
MF:=C-(H+L)/2+Typical()-Ref(Typical(),-1);
FVE:=Sum(If(MF>CUTOFF, +V, If(MF <-CUTOFF, -V,0)),PERIOD)/Mov(V,PERIOD,S)/PERIOD*100;
X1<21 and X1>2 AND {Condition 1}
Ref(LinRegSlope(C,13)/Ref(C,-13)*100,-X1)>2.2{Condition 2}
AND Ref(LinRegSlope(C,X2)/Ref(C,-X2),-1)*100<.2
AND LinRegSlope(C,X1)/Ref(C,-X1)>-1.2 {Condition 3}
AND Ref(LinRegSlope(V,X2)/Ref(V,-X2),-1)*100<-2 {Condition 4}
AND Ref(LinRegSlope(SD,X1),-1)<0 {Condition 5}
AND Stoch(20,3)>55 AND ADX(10)>30{Condition 6}
AND FVE>10 AND Fml("VFI")>-3 {Condition 7}
AND C>Ref(C,-1) AND C>O {Condition 8}