robdavis 69 posts msg #33154 - Ignore robdavis | 
9/5/2004 11:23:46 PM
  Tim,
 
 There are many ways to write a filter. If you don't mind using long filters, and if you want to construct a filter to pick out stocks with the narrowest daily range in past 7 days, and if you also want a requirement on a minimum of 100,000 volume, I'd write...
 
 /*Establish a reference range*/
 set{Highest,high+0.001} 
 set{Lowest,low minus 0.001} 
 
 /*Count the highs and lows that comply with this reference range*/
 /*Yesterday's bar*/
 set{HighCount1,count(high 1 day ago is below Highest,1)}
 set{LowCount1,count(low 1 day ago is above Lowest,1)}
 
 /*The bar 2 days ago*/
 set{HighCount2,count(high 2 days ago is below Highest,1)}
 set{LowCount2,count(low 2 days ago is above Lowest,1)}
 
 ...
 ...
 
 /*The bar 6 days ago*/
 set{HighCount6,count(high 6 days ago is below Highest,1)}
 set{LowCount6,count(low 6 days ago is above Lowest,1)}
 
 /*Add up these 6 * 2 = 12 counts*/
 set{count1,HighCount1+LowCount1} 
 set{count2,HighCount2+count1} 
 set{count3,LowCount2+count2} 
 set{count4,HighCount3+count3} 
 ...
 ...
 set{count11,LowCount6+count10} 
 
 /*Set a minimum limit for the number of highs and lows that have to comply with this reference range*/
 and count11 is above 10 /*This count of 10 can be any number between 0 and 11.999*/
 
 /*Add a global filter*/
 and close is between 1 and 250
 and volume 30 day low is above 100000
 
 And once your new filter is working, you will be able to tweak it; you can, for example, gradually narrow the reference range, and observe how many stocks your new filter yields. 
 
 I hope this helps.
 
 Regards, 
 
 Rob
  
 
 
  | 
raven4ns 23 posts msg #33157 - Ignore raven4ns | 
9/6/2004 11:33:01 AM
  Hi Rob,
  Thank you very much for taking the time and trouble to help me. I truly appreciate it. I will take your filter and play with it to see how it works. It was a thought that a narrow range day might give you an entry into a reasonably low risk trade. Once again, thank you.
 
 Kindest regards,
 
 Tim
 
 
  |