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

Notification

Icon
Error

Options
Go to last post Go to first unread
MS Support  
#1 Posted : Wednesday, January 26, 2011 4:31:27 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,929

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)

Peter Konner’s article, “Combining RSI with RSI” describes a long term system intended to be used with weekly data. The following steps will create an expert advisor for Metastock based on this system:

  1. Tools > New to open the Expert Editor.
  2. Symbols tab.
  3. New to create a new symbol.
  4. 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:=sc2:= Cross( RSI(5) < 40 AND C < Mov( C, 10, S), 0.5);

    trade1:= If(bc1, 1, If(sc1, 0, PREV));

    trade2:= If(bc2, 1, If(sc2, 0, PREV));

    Cross(trade1=1, 0.5) OR (trade1=0 AND Cross(trade2=1, 0.5))

    1. Graphics tab
    2. Up Arrow
    3. Green
    4. Below Price Plot”
    5. Below Symbol”
    6. OK
    7. New to create a new symbol.
    8. 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:=sc2:= Cross( RSI(5) < 40 AND C < Mov( C, 10, S), 0.5);

      trade1:= If(bc1, 1, If(sc1, 0, PREV));

      trade2:= If(bc2, 1, If(sc2, 0, PREV));

      Cross(trade1=0, 0.5) OR (trade1=0 AND Cross(trade2=0, 0.5))

      1. Graphics tab
      2. Down Arrow
      3. Red
      4. Above Price Plot”
      5. Above Symbol”
      6. OK
      7. OK to close the Expert Editor.

      William Golson

      MetaStock Support
jayanthkrovi  
#2 Posted : Thursday, August 23, 2012 6:07:39 AM(UTC)
jayanthkrovi

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/23/2012(UTC)
Posts: 2

just done[H]..thanq
mstt  
#3 Posted : Tuesday, January 20, 2015 6:47:46 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
The original post by William appears to be garbled, as in... sc1:=sc2= etc. Hopefully the following version represents the original code but with PREVs removed. My code takes an extra cycle to get down to business but it replicates the PREV version in all subsequent cycles. Roy {new, coded without PREV} 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))); Cross(trade1=0,0.5) OR (trade1=0 AND Cross(trade2=0,0.5)); {old, coded with PREV} 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); t1:=If(bc1,1,If(sc1,0,PREV)); t2:=If(bc2,1,If(sc2,0,PREV)); Cross(t1=0, 0.5) OR (t1=0 AND Cross(t2=0,0.5))
henry1224  
#4 Posted : Thursday, January 22, 2015 2:27:17 PM(UTC)
henry1224

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)

 

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));
Signal;

 

henry1224  
#5 Posted : Sunday, January 25, 2015 10:43:02 PM(UTC)
henry1224

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)

This is two different systems Double Stoch Mo w 2 ma's and Double Rsi w 2 MA's The Stoch Mo will show 2 or -2 in the indicator line

 

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;

Users browsing this topic
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.