The PTATR scan is as follows: float av, pt, sf; float cl, ATR89, tr,MA89Cl; integer tbar,bar; Set ROC = 34; DaysToLoad=500; DaysRequired=100; tbar:= 0; av := MovAvg(tbar,34,vol); sf := sharesfloat; if close(0)>4 and vol(0)>85000 then if sf > 0 then pt := av/sf/1000/1000; // float is in mil shares if pt >= .028 then // print both vols in thousands ATR89:= 0; // initially set it to zero for each symbol for bar = tbar-88 to tbar do // 89 values; don't need to specify step // 1 because it is the default cl:= close(bar-1); // close(-88) to start tr:= range(bar); // the usual case, no gap if cl > high(bar) then //down tr:= cl - low(bar); else if cl < low(bar) then //up tr:= high(bar) - cl; endif; endif; ATR89:= ATR89 + tr; // add tr to previous value next bar; ATR89:= ATR89/89; // divide the sum by 89 MA89Cl:=movavg(tbar,89,cl); if ATR89/MA89Cl*100>5.75 then println symbol:-7,",",description; endif; endif; endif; endif;
You can find this and some other scans at the QP site. Go to "support" and then look for the "Sample QP2 scan" link.
Mikeman |