Don't need a for loop to backtest, Monty -- often best to just check for a fixed period so you can page thru the charts with the the cursor sitting on that day. For example, just substitute every 0 with day in Richard's BBB scan to give ---------------------- //BBB Scan by Richard Estes with backtest output = "bbb.lst"; integer day; day:= -60; // Set to 0 for no backtest
if Close(day)-Close(day-5)>.05*Close(day-5) and Vol(day) > MovAvg(day,63,vol) and Close(day)>.85*Max(day,day-250,cl) then println symbol,",",close(day):8:3,",", 100*(max(0,day,cl)-close(day))/close(day):6:1,",", 100*(close(0)-close(day))/close(day):6:1; endif; -------------------- Bob |