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: TechTrader42 who wrote (6682)9/19/1998 9:50:00 PM
From: Magnatizer  Read Replies (2) | Respond to of 11149
 
Brooke

thanks for the fix. It is a slow scan. But imagine how long it would have taken to get this list just 3-4 years ago. I love technology.

ht
david



To: TechTrader42 who wrote (6682)9/19/1998 10:25:00 PM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
It's possible to eliminate a lot of the repeat hits in the Shark-32 scan by making it look only for crossovers with "sharkhigh." In other words, it no longer looks for each day the stock closes above the high point in the shark pattern, but only days when it crosses up though that point. I added the second line below to the conditions (the < line):

if close(i+j)>sharkhigh and
close((i+j)-1)<sharkhigh

It's like adding a line in Metastock for crossovers:

close>datarray and
close<ref(data array,-1).

Now the conditions are:

if i+j <=0 then
if close(i+j)>sharkhigh and
close((i+j)-1)<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+j),", ",
"Sharkhigh: ", sharkhigh; //date of buy signal

So the whole scan is now:

//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="volvol.lst";
//ProcessMS = "d:\meta\macdup\",VMS;

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

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;

for j = 24 to 0 step -1 do

if i+j <=0 then
if close(i+j)>sharkhigh and
close((i+j)-1)<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+j),", ",
"Sharkhigh: ", sharkhigh; //date of buy signal
endif;
endif;
next j;

next i;



To: TechTrader42 who wrote (6682)9/20/1998 3:03:00 PM
From: Mike Hagerty  Read Replies (2) | Respond to of 11149
 
Brook:

You may have already changed your scan to improve speed but since you mentioned that you knew it was slow I thought I would share some changes with you. The results are the same, but it is much quicker. My changes could still be cleaned up (fin & shark flags are now unnecessary) and I suspect the scan can be speeded up a little yet.

//Shark-32, by Walter T. Downs,
//translated for QP2 by Brooke
//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.

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

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

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;
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;
if shark=1 then
sharkhigh:=high(-2+i);
endif;

for j = 24 to 0 step -1 do

if i+j <=0 then
if close(i+j)>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+j),", ", "Sharkhigh: ", sharkhigh; //date of buy signal
endif;
endif;
next j;

else
shark:=0;
endif;
else
fin:=0;
endif;

next i;