Would anybody be interested in taking a crack at this system? it seems very promising based on some testing i saw in an article...
I came across a system called Pullback that has the following trading rules (assume today T):
A. LE setup and rule
A1. two previous closes (at bars T-2 and T-1) must have been two consecutive lower closes and
A2. H of bar at T must be higher than H at T-1 and
A3. close of bar at T must be higher than the 50-period EMA of closes for bar T
A4. buy at next open if A1 and A2 and A3 are all true
B. LX
B1. sell at next open when position shows a profit at close
B2. sell at a loss if the L falls below lowest low of the last two bars
C. Position Size
number of shares to trade = 4% * available equity / (entry price-stop-loss price [item B2 above])
This is my attempt to code it in MS's EST:
BUY:
LEsetup1:=ref(c,-2)<ref(c,-3) and ref(c,-1)<rf(c,-2);
LEsetup2:=h>ref(h,-1);
LEsetup3:=c>mov(c,50,e);
LE:=LEsetup1=1 and LEsetup2=1 and LEsetup3=1;
ref(LE=1,-1)
SELL:
LXsetup1:=valuewhen(1,LE,ref(o,1))-c>0;
LXsetup2:=l<(llv(l,2),-1);
LX:=LXsetup1=1 or LXsetup2=1;
ref(LX,-1)
NOT SURE HOW TO CODE "availbale equity" but the basic equation for position size is:
number of shares to trade = 4% * available equity / (valuewhen(1,LE,ref(o,1))-ref(llv(l,2),-1))