Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 2,009
Thanks: 99 times Was thanked: 163 time(s) in 158 post(s)
|
Dion Kurczek’s article, “One Percent A Week”, introduced his trading strategy for TQQQ. Here are the entry and exit signal formulas to create an expert advisor in MetaStock based on this strategy:
One Percent a Week:
Buy Signal: Code:{buy}
nw:=ROC(DayOfWeek(),1,$)<0;
Omon:= ValueWhen(1, nw, O);
ePrice:= Int(100*(Omon * 0.99))/100; {truncates price to 2 decimal places}
sPrice:= ePrice * 0.995;
tPrice:= ePrice * If(LowestSince(1,nw, L)<sPrice, 1, 1.01);
hExit:= DayOfWeek() = 5 AND Hour()= 16; {hard exit on Friday Close}Track:=
If(nw, 0, {reset tracking for the start of a new week}
If(PREV =0, {only look for trades if not already in one}
If((L<=ePrice) AND (hExit=0), 1, 0 ), {initiates a trade if the entry price is hit}
If(H >= tPrice, -1,
If(hExit, -2, PREV))));
Cross( track, 0.5)
Exit Signal: Code:{exitl}
nw:=ROC(DayOfWeek(),1,$)<0;
Omon:= ValueWhen(1, nw, O);
ePrice:= Int(100*(Omon * 0.99))/100; {truncates price to 2 decimal places}
sPrice:= ePrice * 0.995;
tPrice:= ePrice * If(LowestSince(1,nw, L)<sPrice, 1, 1.01);
hExit:= DayOfWeek() = 5 AND Hour()= 16; {hard exit on Friday Close}Track:=
If(nw, 0, {reset tracking for the start of a new week}
If(PREV =0, {only look for trades if not already in one}
If((L<=ePrice) AND (hExit=0), 1, 0 ), {initiates a trade if the entry price is hit}
If(H >= tPrice, -1,
If(hExit, -2, PREV))));
Cross( 0, track )
|