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 (6670)9/19/1998 8:24:00 PM
From: TechTrader42  Read Replies (2) | Respond to of 11149
 
Craig: Thanks! That very well could be it. Here's how that happened: Last night, I first misread symmetry to be 28, and everything kept coming out wrong. I finally realized that the problems were due to the fact that symmetry was .28, but I forgot to move it from integers to float.

Thank you so much!

Brooke



To: Craig DeHaan who wrote (6670)9/19/1998 8:46:00 PM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
Oh, and my 200MMX couldn't keep from overheating on the
full-blown date reporting version.


Craig: The date-reporting version is the best version. Moving
"symmetry" to float did the trick. The picks appear to be the same as
those found with the Metastock formula, incredibly enough.

It isn't just that this version reports the date; it looks for the
price closing above the high point in the shark pattern on any day
after the pattern has occurred. The faster, shorter version looks only
for stocks that closed on the most recent day -- close(0)-- above the
high point ("Sharkhigh").

The most accurate version is the slow date-reporting version, unforch.
Here it is again:

//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 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
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;