trendscanner 265 posts msg #86938 - Ignore trendscanner |
1/24/2010 8:58:39 PM
I'm trying to find stocks with a certain maximum ratio between the difference between the maximum Bollinger Band width over a past period and the minimum Bollinger Band width during that same period. I tried the approach below with no success.
Any ideas how to code something like this? This is what I tried that didn't work.
set{diff, upper Bollinger band(20,2) - lower bollinger band(20,2)}
set{diffmax, high 12 month high diff}
set{diffmin, low 12 month low diff}
ratio{diffmax / diffmin}
ratio < 5
thanks
|
chetron 2,817 posts msg #86943 - Ignore chetron modified |
1/24/2010 9:18:32 PM
MAYBE...
|
trendscanner 265 posts msg #86944 - Ignore trendscanner |
1/24/2010 9:32:12 PM
Thanks Chetron. Using your suggestions and fidddling with it, the version below seems to get at what I was looking for
|
chetron 2,817 posts msg #86946 - Ignore chetron |
1/24/2010 9:37:29 PM
I CHANGED THE MONTHLY THING TO AN EQUIVELANT DAILY THING.
|
trendscanner 265 posts msg #86947 - Ignore trendscanner |
1/24/2010 9:43:28 PM
Yes, thanks, I think the daily approach works better. This is my basic working version now
|