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: Monty Lenard who wrote (9034)4/3/1999 6:58:00 PM
From: Peter H. Mack  Read Replies (2) of 11149
 
I played a bit with the hammer code, and came up with this..
It needed a != statement, and also a walking up EMA loop to make it pretty, but it does seem to work well.. Thanks for your ideas.

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

integer day, flag;
float temp, last;

DaysRequired(100);
DaysToLoad(99);

last :=0;
flag :=1;

if range(0)> 0 and
open(0) => (low(0) + (range(0)*.5)) and
close(0) => low(0) + (range(0)*.5) and
open(0) != close(0) and
MACD(0) <= 0 and
close(0) < 20 and
close(0) > 5 then
for day = 0 to -30 step -1 do
temp := EMovAvg(day,26,cl);
if temp < last then
flag :=0;
day := -30;
else
last := temp;
endif; // if temp local
next day;

if flag > 0 then
println symbol,",","hammer",",",date(0);
endif; // local
endif;// if range
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext