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 (6731)9/21/1998 11:33:00 PM
From: TechTrader42  Respond to of 11149
 
I'll have to take a look at the Four-Bar System. In the meantime, there were some errors and omissions in my QP2 bull/bear scan, including a misplaced "lo" in the "bullfear" formula. Also, I forgot to take "bullfear" and "bearfear" back a day with the close. Here is a fixed scan:

//Bull/Bear Fear, by Walter T. Downs
//translated for QP2 by Brooke
//based on article in August 1998 issue of TASC
//n := 12 {Time periods};
//BullFear := (HHV(HIGH,n) - LLV(HIGH,n))/2 + LLV(HIGH,n);
//CLOSE > BullFear
//BearFear := (HHV(LOW,n) - LLV(LOW,n))/2 + LLV(LOW,n);
//CLOSE < BearFear

output = "bull.lst";
input="volvol.lst";

integer periods;
float bullfear, bearfear, bullfprev, bearfprev;

periods:=11;

bullfear:=(max(0,-periods,hi)-min(0,-periods,hi))/2 + min(0,-periods,hi);
bullfprev:=(max(-1,-(periods+1),hi)-min(-1,-(periods+1),hi))/2 +
min(-1,-(periods+1),hi);

bearfear:=(max(0,-periods,lo)-min(0,-periods,lo))/2 + min(0,-periods,lo);
bearfprev:=(max(-1,-(periods+1),lo)-min(-1,-(periods+1),lo))/2
+ min(-1,-(periods+1),lo);


if close(0)>bullfear then
if close(-1)<bullfprev then
println symbol,",", "Buy: ", "Close: ", close(0):6:2,", ", "Change: ",
Close(0)-Close(-1):5:2, ", ", "Bullfear: ", bullfear;
endif; endif;

if close(0)<bearfear then
if close(-1)>bearfprev then
println symbol,",", "Sell: ", "Close: ", close(0):6:2,", ", "Change: ",
Close(0)-Close(-1):5:2, ", ", "Bearfear: ", bearfear;
endif; endif;



To: Craig DeHaan who wrote (6731)9/22/1998 1:48:00 AM
From: TechTrader42  Read Replies (2) | Respond to of 11149
 
Craig: Here's my attempt at the Four-Bar Fear Scan for longs. (I'll work on a scan for shorts tomorrow.)

I've checked this scan against hits in Metastock, and they seem to be the same. (For example, ITIG and ALT are among the hits tonight.)

This is a first attempt. Forgive me if there are any glaring errors.

//Four-Bar Fear, Longs, by Walter T. Downs
//translated for QP2 by Brooke
//n := 12 {Time periods};
//BullFear := (HHV(HIGH,n) - LLV(HIGH,n))/2 + LLV(HIGH,n);
//BearFear := (HHV(LOW,n) - LLV(LOW,n))/2 + LLV(LOW,n);
//Alert(Cross(CLOSE,BullFear) AND Ref(Sum(CLOSE <
//BullFear AND CLOSE > BearFear,4),-1) = 4,1)

output = "fourbar.lst";
//input="volvol.lst";

integer periods, i;
float bullfear, bearfear, bearflag,
bullfprev, bearfprev, bullflag;

periods:=11;

bullfear:=(max(0,-periods,hi)-min(0,-periods,hi))/2 +
min(0,-periods,hi);

bearfear:=(max(0,-(periods),lo)-min(0,-periods,lo))/2 +
min(0,-periods,lo);

bearflag:=0;
bullflag:=0;
for i = 0 to -3 step -1 do
bullfprev:=(max(i-1,-((periods+1)-i),hi)
-min(i-1,-((periods+1)-i),hi))/2 +
min(i-1,-((periods+1)-i),hi);
bearfprev:=(max(i-1,-((periods+1)-i),lo)-
min(i-1,-((periods+1)-i),lo))/2
+ min(i-1,-((periods+1)-i),lo);

if close(i-1)<bullfprev and
close(i-1)>bearfprev then
bullflag:=bullflag+1;
endif;

next i;

if close(0)>bullfear
and bullflag=4 then
println symbol,",", "Buy: ", "Close: ", close(0):6:2,", ",
"Change: ", Close(0)-Close(-1):5:2, ", ",
"Bullfear: ", bullfear, ", ", "Bullflag: ", bullflag;
endif;