Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
Here are 2 systems Double Stoch Mo and Double RSI
*code*
SM1:=100*(Mov(Mov(C-(.5*(HHV(H,5)+LLV(L,5))),3,E),3,E)/
(.5*Mov(Mov(HHV(H,5)-LLV(L,5),3,E),3,E)));
SM2:=100*(Mov(Mov(C-(.5*(HHV(H,20)+LLV(L,20))),3,E),3,E)/
(.5*Mov(Mov(HHV(H,20)-LLV(L,20),3,E),3,E)));
bc1:=Cross(SM2>65 AND C>Mov(C,40,S),0.5);
bc2:=Cross(SM1 >65 AND C>Mov(C,10,S),0.5);
sc1:=Cross(SM2<-65 AND C<Mov(C,40,S),0.5);
sc2:=Cross(SM1 <-65 AND C<Mov(C,10,S),0.5);
trade1:=If(bc1,1,If(sc1,0,ValueWhen(1,bc1+sc1,bc1 OR sc1=0)));
trade2:=If(bc2,1,If(sc2,0,ValueWhen(1,bc2+sc2,bc2 OR sc2=0)));
trade3:=If(sc1,1,If(bc1,0,ValueWhen(1,bc1+sc1,sc1 OR bc1=0)));
trade4:=If(sc2,1,If(bc2,0,ValueWhen(1,bc2+sc2,sc2 OR bc2=0)));
A:=Cross(trade1=0,0.5) OR (trade1=0 AND Cross(trade2=0,0.5));
B:=Cross(trade3=0,0.5) OR (trade3=0 AND Cross(trade4=0,0.5));
Signal2:=2*If(BarsSince(A)<BarsSince(B),-1,If(BarsSince(B)<BarsSince(A),1,0));
bc1:=Cross(RSI(17)>60 AND C>Mov(C,40,S),0.5);
bc2:=Cross(RSI(5) >60 AND C>Mov(C,10,S),0.5);
sc1:=Cross(RSI(17)<40 AND C<Mov(C,40,S),0.5);
sc2:=Cross(RSI(5) <40 AND C<Mov(C,10,S),0.5);
trade1:=If(bc1,1,If(sc1,0,ValueWhen(1,bc1+sc1,bc1 OR sc1=0)));
trade2:=If(bc2,1,If(sc2,0,ValueWhen(1,bc2+sc2,bc2 OR sc2=0)));
trade3:=If(sc1,1,If(bc1,0,ValueWhen(1,bc1+sc1,sc1 OR bc1=0)));
trade4:=If(sc2,1,If(bc2,0,ValueWhen(1,bc2+sc2,sc2 OR bc2=0)));
A:=Cross(trade1=0,0.5) OR (trade1=0 AND Cross(trade2=0,0.5));
B:=Cross(trade3=0,0.5) OR (trade3=0 AND Cross(trade4=0,0.5));
Signal:=If(BarsSince(A)<BarsSince(B),-1,If(BarsSince(B)<BarsSince(A),1,0));
0;Signal2;Signal;
*/code*
when plotted as an indicator the Double Stoch Mo will be +2 or -2
The Double RSI code will be +1 or -1
|