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 (6646)9/18/1998 11:51:00 PM
From: TechTrader42  Respond to of 11149
 
Craig: I just finished my own version. You can compare signals in Metastock. Mine do seem to match, if you leave out the 25-day alert. I'll get to that. This is an exact translation (I hope) of "Shark". My next effort will be to incorporate the 25-day alert to match "Shark Buy".

//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;
float shark, apex, WB, fin;

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

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

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

if shark = 1 then
println symbol,",", "Close: ", close(0):8:2,",", "Change: ", Close(0)-Close(-1):8:2;
endif;



To: Craig DeHaan who wrote (6646)9/19/1998
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
To further explain: My scan gives the Shark signal. But to get a Shark buy, you need to meet another condition: The price has to "cross above the high value of the base within 25 periods." Bruce's scan doesn't appear to address this either, unforch.

This is what still needs to be translated:

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

Chk:=Cum(Buyok)-ValueWhen(1,Shark=1,Cum(Buyok));

ValidChk:=Alert(Shark=1,25);

Buy:= Buyok=1 AND Ref(Chk,-1)=0 AND ValidChk=1;

Buy;

Brooke