StockFetcher Forums · Filter Exchange · Need help with Bollinger Band filter<< >>Post Follow-up
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...

Fetcher[

set{Vdiff, upper Bollinger band(20,2) - lower bollinger band(20,2)}
set{diffmax, VDIFF 200 DAY high}
set{diffmin, VDIFF 200 DAY low}
SET{Vratio,diffmax / diffmin}
Vratio < 5




]



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

Fetcher[
set{diff, upper Bollinger band(20,2) - lower bollinger band(20,2)}
set{diffmax, DIFF 12 month high}
set{diffmin, DIFF 12 month low}
diffmin > 0.1
SET{ratio,diffmax / diffmin}
close > 0.1
Count(ratio > 5, 100) < 1
draw diff
draw diffmax
draw diffmin
]



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

Fetcher[
set{diff, upper Bollinger band(20,2) - lower bollinger band(20,2)}
set{diffmax, DIFF 200 day high}
set{diffmin, DIFF 200 day low}
diffmin > 0.1
SET{ratio,diffmax / diffmin}
close > 0.1
not etf
Count(ratio > 5, 100) < 1
draw bollinger bands(20,2)
draw diff
draw diffmax
draw diffmin
chart-length is 6 months
]



StockFetcher Forums · Filter Exchange · Need help with Bollinger Band filter<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.