This picks up DSP, not to say that the StochasticPctD should not be kept at 80 but I have found that sometimes I need to RELAX the rules just a tad on these candle scans. FWIW
input = "Volume.lst"; output = "Bobs Hanging Hammer.lst";
string CndlType; float maxPr, minPr, top, upper; integer tbar, LSD, HSD; LSD := 20; //set for low StochasticPctD HSD := 60; //set for high StochasticPctD
tbar := 0; //output = "hammer.lst"; minPr := 1; maxPr := 300; top := .33; upper := .05*range(tbar); DaysToLoad = 100 -tbar; Daysrequired = 100 - tbar; set Stochastic = 15,3,3; printhdrln " Symbol,CType,Stoch%D,MACD,tbar,date"; if close(tbar) <= maxPr and close(tbar) >= minPr then if open(tbar) >= high(tbar) - top*range(tbar) and close(tbar) >= high(tbar) - top*range(tbar) and range(tbar)> 0 and open(tbar) != close(tbar) then if StochasticPctD(tbar) < LSD and low(tbar) < min(tbar-1,tbar-3,lo) then println symbol,",","Hammer",",",StochasticPctD(tbar):4:3,",", MACD(tbar),",",tbar,",",date(tbar); endif; if StochasticPctD(tbar) > HSD and high(tbar) > max(tbar-1,tbar-3,hi) then println symbol,",","Hanger",",",StochasticPctD(tbar):4:3,",", MACD(tbar),",",tbar,",",date(tbar); endif; endif; endif; |