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

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Bob Jagow who wrote (9244)4/6/1999 4:16:00 PM
From: Peter H. Mack  Read Replies (1) of 11149
 
There might be something in the code, or it is just a case of today being a bad day for hammers..
I offer here essentially the same code but it now looks for ANY hammer in the last 100 days, and then checks for a downslope preceding it.. Admittedly this is more complicated to follow, but I just couldn't let it rest..

Note that the printout gives the date of the hammer found.

regards
pete

exchange = nyse, amex, nasdaq;
output = "hammer test.lst";

integer day, hamday, span, flag;
float temp, last;

DaysRequired(200);
DaysToLoad(199);

last :=0;
span := -100;
flag :=0;

for day = 0 to span step -1 do

if range(day)> 0 and
open(day) => (low(day) + (range(day)*.5)) and
close(day) => low(day) + (range(day)*.5) and
open(day) != close(day) and
// (open(day)= high(day OR close(day) = high (day)) // statement doesnt work
MACD(day) <= 0 and
close(day) < 20 and
close(day) > 1 then
hamday := day; // a hammer found
flag :=1;
day := span;
endif;
next day;

// look for preceding slope
if flag >0 then
for day = hamday to hamday-30 step -1 do
temp := EMovAvg(day,26,cl);
if temp < last then
flag :=0;
day := hamday-30;
else
last := temp;
endif; // if temp local
next day;
endif;


if flag > 0 then
println symbol,",",close(0),",",Date(hamday),",","Hammer",",",date(0);
endif; // local

Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext