SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus -- Ignore unavailable to you. Want to Upgrade?


To: Craig DeHaan who wrote (6654)9/19/1998 3:30:00 AM
From: TechTrader42  Respond to of 11149
 
Craig: The buy signal may not be all that complicated. The Shark is a pattern, like a shark fin, and my first scan finds that pattern. As Downs says, it's "a three-bar pattern ... with progressively smaller ranges."

For a buy signal, price has to close above the widest point of the pattern. The widest point is ref(H,-2). But the Shark signal, once it has occurred, is valid for 25 periods. So as long as the pattern occurred in the last 25 periods, if price breaks above the widest point of the pattern, you get a buy signal. That's the theory behind it. Now we just need to translate it. It's the ref(h,-2) in the Shark pattern that sets the threshold that price needs to break during the 25-day period.

Basically, I just need to put a loop in the Shark scan, run it back 25 days, and then look for when the close(0)>high(i-2).

I'll take a look at it tomorrow.

Brooke



To: Craig DeHaan who wrote (6654)9/19/1998 4:57:00 PM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
Craig: I've added the buy signal to the scan. This is the best I can
do for now, it seems.

The picks seem accurate, but one problem with the scan now is that the
output gives the date of the last Shark signal, not the date of the
buy signal. I'd like to change this, but right now, I'm stumped. The
scan does look only for those stocks that have given a buy signal over
the past 25 days.

The idea behind the system is: Look for a three-bar shark pattern,
based on progressively smaller ranges. It looks like a shark fin. Once
that pattern appears, a level is set by the highest point in the fin,
which is the high(-2). In the scan, I call that level "Sharkhigh." To
get a buy signal, the price has to close above that level within 25
days. If you want to plot "sharkhigh" over a chart with the price, you
can do it with the "BuyOK" part of the Metastock formula by plotting
this:

Symmetry:=.28;
Apex:=(H+L)/2;
WB:=Ref(H,-2)-Ref(L,-2);

Shark:=If((H<Ref(H,-1) AND L>Ref(L,-1) AND Ref(H,-1)<Ref(H,-2) AND
Ref(L,-1)>Ref(L,-2)),
If(apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >=
(Ref(L,-2)+(WB*Symmetry)) ,1,0),0);

Buyok:=ValueWhen(1,Shark=1,Ref(H,-2));

Buyok;

That's like a resistance level that the price has to break through. It
lasts for 25 days or until a new Shark signal appears.

The QP scan looks for stocks that break above the high point in the
shark pattern.

As I said, the one improvement I'd like to make is to have the scan
give the date when the price closes above the high point in the shark
pattern.

Here's the scan:

//Shark-32, by Walter T. Downs, translated for QP2 by Brooke

//Shark:=If((H<Ref(H,-1) AND L>Ref(L,-1) AND
// Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)>Ref(L,-2))=1,
//If(apex <= (Ref(H,-2)-(WB*Symmetry)) AND
// Apex >= (Ref(L,-2)+(WB*Symmetry)) ,1,0),0);

output = "shark.lst";
input="commplus.lst";
//ProcessMS = "d:\meta\macdup\",VMS;

integer symmetry, i;
float shark, apex, WB, fin, sharkhigh;

for i = -24 to 0 step 1 do

symmetry:=.28;
apex:=(high(i)+low(i))/2;
WB:=high(i-2)-low(i-2);

if apex<=(high(i-2)-(WB*Symmetry)) and apex>=(low(i-2)+(WB*Symmetry)) then
fin:=1;
else fin:=0;
endif;

sharkhigh:=0;
if high(i)<high(i-1) and
low(i)>low(i-1) and
high(i-1)<high(i-2) and
low(i-1)>low(i-2) then
shark:=fin;
else shark:=0;
endif;

if shark=1 then
sharkhigh:=high(-2+i);
endif;

if close(0)>sharkhigh and
sharkhigh>0 and
shark =1 then
println symbol,",", "Close: ", close(0):6:2,", ", "Change: ", Close(0)-Close(-1):5:2,
", ", "Date: ", date(i),", ",
"Sharkhigh: ", sharkhigh; //date is date when shark equals 1, not date of signal
endif;

next i;