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 : Friday, July 28, 2017 9:23:47 PM(UTC)
MS Support

Rank: Advanced Member

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

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)

James E Rich and John B. Rich's article, “Simplify It”, presented a simple trading system.  The article suggested using the direction of a 50 period SMA on the SPY to find the market trend.  Then look for stocks in a trend going the same direction.  From there, channel lines are used to find the entry and exit points. The formulas below combine all those conditions into entry and exit signals you can put into a system test or an expert adviser. 

Enter Long:

Code:
s1:= Security("SPY", C);
ma1:= Mov(C, 20, S);
ma2:= Mov(C, 50, S);
ma3:= Mov(C, 200, S);
dir:= If( ROC( Mov(s1, 50,S), 1,$)>0, 1, -1);
tradelong:= dir = 1 AND
ma1 > ma2 AND ma2 > ma3;
tline:= Mov(H,8,S);
bline:= Mov(L,8,S);
el:= C > tline AND tradelong;
xl:= L < bline;
trade:= If(el, 1, If(xl, 0, PREV));
trade = 1 AND Ref(trade = 0, -1)

Exit Long:

Code:
s1:= Security("SPY", C);
ma1:= Mov(C, 20, S);
ma2:= Mov(C, 50, S);
ma3:= Mov(C, 200, S);
dir:= If( ROC( Mov(s1, 50,S), 1,$)>0, 1, -1);
tradelong:= dir = 1 AND
ma1 > ma2 AND ma2 > ma3;
tline:= Mov(H,8,S);
bline:= Mov(L,8,S);
el:= C > tline AND tradelong;
xl:= L < bline;
trade:= If(el, 1, If(xl, 0, PREV));
trade = 0 AND Ref(trade = 1, -1)

Enter Short:

Code:
s1:= Security("SPY", C);
ma1:= Mov(C, 20, S);
ma2:= Mov(C, 50, S);
ma3:= Mov(C, 200, S);
dir:= If( ROC( Mov(s1, 50,S), 1,$)>0, 1, -1);
tradeshort:= dir = -1 AND
ma1 < ma2 AND ma2 < ma3;
tline:= Mov(H,8,S);
bline:= Mov(L,8,S);
es:= C < bline AND tradeshort;
xs:= H > tline;
trade:= If(es, 1, If(xs, 0, PREV));
trade = 1 AND Ref(trade = 0, -1)

Exit Short:

Code:
s1:= Security("SPY", C);
ma1:= Mov(C, 20, S);
ma2:= Mov(C, 50, S);
ma3:= Mov(C, 200, S);
dir:= If( ROC( Mov(s1, 50,S), 1,$)>0, 1, -1);
tradeshort:= dir = -1 AND
ma1 < ma2 AND ma2 < ma3;
tline:= Mov(H,8,S);
bline:= Mov(L,8,S);
es:= C < bline AND tradeshort;
xs:= H > tline;
trade:= If(es, 1, If(xs, 0, PREV));
trade = 0 AND Ref(trade = 1, -1)

Users browsing this topic
Guest (Hidden)
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.