To any and all, I am trying to write my first scan in qp2. I keep getting an error at the t of the then statement- "syntax error-unexpected t" . I can't see what I am doing wrong when I look at other scans.
output = "!MA and Stoch.lst";
DaysToLoad = 250;
if ( EMovAvg(0,20,cl) > MovAvg(0,50,cl) ) and // 20dema> 50 dma ( MovAvg(0,50,cl) > MovAvg(0,200,cl) ) and // 50 dma >200 dma (Close (0) > Movavg(0,50,cl) and //Above 50 dma (Close(0) > Max(-1,-250,cl)*.8 and //Within 20% of hi (Movavg (0,50,cl)>Movavg(-15,50,cl)*1.02 and //rising 50dma ( Close(0)>= 12 ) and // At least a 12 ( Close(0)<= 40 ) and // And less than 40 ( AvgVol(0,-29)>= 20000 ) and // 50,000 shares (Min(-1,-5,stochPctK)+0 <30) and // Dip in stoch (close(0) > close (-1)+.25) then //Higher close
println symbol , "," , Description; endif;
Thanks for any help
Tom |