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 |