jkiehle 13 posts msg #33111 - Ignore jkiehle |
9/2/2004 11:57:02 PM
I was wondering if anyone out there could give me some pointers on how to filter for stocks like AGII. Flat for long periods but with a good daily swing.
Any Ideas??
|
robdavis 69 posts msg #33114 - Ignore robdavis |
9/4/2004 2:04:51 AM
Jkiehle,
AGII appears to be one of a kind, with its wide intraday swings, and its ability to trade in a seemingly narrow channel. The best two ideas I've come across so far are...
A) Look for stocks with a relatively high ratio of daily trading range as expressed by "(high-close)/close".
And B) Look for stocks that trade in "Narrow XX-day Channels". With these two ideas, here's the filter I've written...
One issue is this: As soon as we restrict stocks to ratios higher than 0.05, we tend to filter out just about all stocks.
Another issue is the following: as soon as we narrow down our search to stocks that trade in "channels", we filter out a huge number of stocks. And the latter includes AGII, one of your favorite stocks.
A third issue is, we have to lower the 30-day low volume to 20,000, if I want to include your AGII. And, as you know, trading stocks with a volume that can suddenly drop down to 20,000 or 30,000 per day is probably not a good idea.
I suggest you experiment, and adjust, and search for values for this filter, and find out by experimentation what works best for you.
I hope this helps.
Rob
|
robdavis 69 posts msg #33115 - Ignore robdavis |
9/4/2004 2:15:08 AM
P.S.: Ooops, a typo has slipped in. The math expression of "(high-close)/close" should be "(high-LOW)/close".
Sorry about that.
Rob
.
|
jkiehle 13 posts msg #33118 - Ignore jkiehle |
9/4/2004 2:16:26 PM
Rob,
Thanks for your efforts. I will be experimenting with this a little later today, alas I have to do some real work today.
You have run into many of the same hurdles I have. I know there must be a way though,because I initially find these visually. I look at one year charts where the chart is thick and dark, then I look for long really flat periods in the last 90 days especially the last 30 days, then I look to see if there is enough volume. As you know it takes forever to scan hundreds of charts just to find one stock to investigate further.
I just feel like if I can eball it I should be able to figure out how to program it. Thanks for your ideas it has spawned some other thoughts hmmm....what if.....
|
robdavis 69 posts msg #33122 - Ignore robdavis |
9/4/2004 6:35:39 PM
Jkiehle,
Here's another idea for you.
If you don't mind long filters -- because, as you know, we cannot use straight "OR" operators; and because we cannot say, "and set{delta,high N days ago minus low N days ago}"; and because we cannot say, "and set{y29,x0+x1+x2+... +x29}"; and because we cannot debug scripts that have more than ten "set{}" statements in them -- you could write...
and set{delta0,high minus low}
and set{ratio0,delta0 divided by close}
and set{x0,count(ratio0 is above 0.05,1)}
and set{delta1,high 1 days ago minus low 1 day ago}
and set{ratio1,delta1 divided by close 1 days ago}
and set{x1,count(ratio1 is above 0.05,1)}
...
...
...
and set{delta29,high 29 days ago minus low 29 days ago}
and set{ratio29,delta29 divided by close 29 days ago}
and set{x29,count(ratio29 is above 0.05,1)}
This way you would write three new lines of script for every bar in the last 30 days, and then you could close those (30 x 3 = ) 90 lines with the following 31 lines of script...
and set{y0,x0+x1}
and set{y1,y0+x2}
...
...
...
and set{y29,x28+x29}
and y29 is above 15
This way you would allow the computer more freedom to choose stocks with any 15 of their 30 bars elongated (as opposed to insisting that, of the 30 last bars, what should be elongated are bar numbers 0, 2, and 4.)
I hope this helps.
Rob
|
jkiehle 13 posts msg #33123 - Ignore jkiehle |
9/4/2004 8:40:10 PM
Rob,
Say if I was working on the last 10 days did you mean:
and set{y0,x+x0}
and set{y1,x0+x1}
and set{y2,x1+x2}
and set{y3,x2+x3}
and set{y4,x3+x4}
and set{y5,x4+x5}
and set{y6,x5+x6}
and set{y7,x6+x7}
and set{y8,x7+x8}
and set{y9,x8+x9}
and set{y10,x9+x10}
and y10 is above 15
|
jkiehle 13 posts msg #33125 - Ignore jkiehle |
9/4/2004 8:53:12 PM
Rob,
If you have time would you look at this and see if the syntax is correct I am not getting anything back and I dont understand the code well enough yet to see the problem. Thanks, Jonathan
|
jkiehle 13 posts msg #33126 - Ignore jkiehle |
9/4/2004 8:57:22 PM
Rob,
I found one thing fixed that but it is still not working here is the current code.
If you have time would you look at this and see if the syntax is correct I am not getting anything back and I dont understand the code well enough yet to see the problem. Thanks, Jonathan
|
jkiehle 13 posts msg #33129 - Ignore jkiehle |
9/4/2004 10:47:18 PM
YAhoo...I got it to work now for some tweaking. I will let you know how it works out.
Jonathan
|
yepher 359 posts msg #33131 - Ignore yepher |
9/4/2004 10:52:11 PM
jkiehle
You wrote: I was wondering...Flat for long periods but with a good daily swing.
Stockfetcher has a few terms that I think are exactly what you are looking for. Have a look at Slope and Lear Regression for the "Flat" part. Then for the "good daily swing" part have a look at these: Day Range / Average Day Range / Day Point Range
I hope this helps.
|