I get the accursed d by z error if I try this, too:
if j<0 // eliminate first pass thru loop and b< b1 and abs((b1/b)-1)> 0.1 then println symbol,",", date(i),",",close(0):6:2,","," B: ", b:4:3,","," B1: ", b1:4:3,","," Pctgain: ", pctgain:4:2; b1:=b; // save current for next test else b1:=b; // must alway set ot last day's val endif; next j;
I'm handing this job back to you. How you worked out that coding for b1 is beyond me. How exactly does the scan define b1 as the next j's value for b? I think it's this little mystery that's preventing me from dropping the percentage condition in just the right place in the scan. I've managed to come up with some percentage qualifiers that don't get "divide by zero" stamped all over them, but the values aren't right, because the formula hasn't worked out b1 yet. And yet b1 is still correct in the output. Even my pctgain is correct, as long as I don't try to use the formula anywhere as a condition. Befuddled is the word here.
Brooke
|