StockFetcher Forums · Filter Exchange · Bollinger Band Squeeze Filter<< >>Post Follow-up
trendscanner
265 posts
msg #79716
Ignore trendscanner
9/20/2009 12:09:20 PM

I’m sure this has been done many times on this site but here’s my effort at a BB squeeze filter that produces consistent results in the long direction. Started with the basic filter on the home page and, through various backtests, made some modifications to eliminate losing trades.

FWIW, here’s the current version. I’m sure there’s further optimization that could be done. This version is ONLY effective during a bull market; backtesting showed poor results during 2008. But it did well during all of 2009.

This version doesn’t produce that many hits, only about 30 during 2009 between late April 2009 and now. None of them hit the 10% stop loss and the majority hit the 10% stop profit.

Most of the backtesting I did was with a 10% stop loss and 10% profit stop. The ROI with that set up out performs the SPX during the test periods. The ROI indicated by the backtesting underestimates the potential profit for many trades since many of these stocks made big upward moves and quickly hit the 10%. Holding these longer and using a trailing stop would have produced better results. I tried a variety of stop profit conditions and couldn’t find a combination that worked well across the board for the backtests, so finally gave up on that. Maybe someone has some good ideas that would improve the exit strategy.


Fetcher[
/*Trendscanner Bollinger Band Squeeze */

set{price_ratio, atr(8)/ema(8)}
set{Diff,Upper Bollinger Band(20) - Lower Bollinger Band(20)}
set{ratio, diff/price_ratio}
set{price_diff, ema(8) - ema(8) 5 weeks ago}
set{pricepct, price_diff / ema(8)}

Diff reached a new 4 month low within last 3 days
CMA(Diff,5) has been decreasing for the last 5 days

MACD Fast Line(12,26,9) crossed above the MACD Slow Line(12,26,9) within the last 2 days

close between 1 and 20
close reached a new 20 week high within last 16 weeks
average volume(30) between 30000 and 2000000
volume above 20000

Money Flow Index(15) increasing for last 3 days
Money Flow Index(15) is above 60
price_ratio between 0.01 and 0.04
ratio between 30 and 10
abs(pricepct) above 0
close above close 8 weeks ago

draw Bollinger Bands(20)
draw MACD Histogram(12,26,9)
add column ratio
add column price_ratio
sort by column 6 descending
]



If you relax the MFI(15) conditions, it picks up more trades but some will start to hit the stop loss. While trying a few slightly less restrictive MFI conditions, I found one hit on Friday, FCSX, which I may take a position in on Monday, depending on how the market opens.

If anyone has experience with BB squeeze filters and has suggestions for improvement, especially relaxing some of the criteria to find more winners, please let me know.


chetron
2,817 posts
msg #79717
Ignore chetron
9/20/2009 12:31:42 PM

HOW ABOUT....


Fetcher[

/*Trendscanner Bollinger Band Squeeze */
/* WITH CHETRON TWEAK */

set{price_ratio, atr(8)/ema(8)}
set{Diff,Upper Bollinger Band(20) - Lower Bollinger Band(20)}
set{ratio, diff/price_ratio}
set{price_diff, ema(8) - ema(8) 5 weeks ago}
set{pricepct, price_diff / ema(8)}

Diff reached a new 4 month low within last 3 days
CMA(Diff,5) has been decreasing for the last 5 days

MACD Fast Line(12,26,9) crossed above the MACD Slow Line(12,26,9) within the last 2 days

close between 1 and 20
close reached a new 20 week high within last 16 weeks
average volume(30) between 30000 and 2000000
Money Flow Index(15) increasing for last 3 days
volume above 20000

price_ratio between 0.01 and 0.04
ratio between 30 and 10
abs(pricepct) above 0
close above close 8 weeks ago
VOLUME ABOVE VOLUME 1 DAY AGO

draw Bollinger Bands(20)
draw MACD Histogram(12,26,9)
add column ratio
add column price_ratio
sort by column 6 descending

]



trendscanner
265 posts
msg #79724
Ignore trendscanner
9/20/2009 1:43:30 PM

I like it, will try it with some backtesting. When I dropped the MFI(15) above 60 requirement completely, I ended up with some losers.

MFI(15) above 55 gave OK results. I think the MFI(15) requirement, whether its at 55 or 60, ensures there's enough money/accumulation coming into the stock that upward pressure is going to result in an upswing shortly. When money flow is too low, the stock is just moving sideways.

trendscanner
265 posts
msg #79761
Ignore trendscanner
modified
9/21/2009 9:49:52 AM

Spent some time last night optimizing some of the parameters on this filter though backtesting. The version below produced the best results.

Fetcher[
set{price_ratio, atr(8)/ema(8)}
set{Diff,Upper Bollinger Band(20) - Lower Bollinger Band(20)}
set{ratio, diff/price_ratio}

Diff reached a new 4 month low within last 3 days
CMA(Diff,5) has been decreasing for the last 5 days

MACD Fast Line(12,26,9) crossed above the MACD Slow Line(12,26,9) within last 2 days

close between 1 and 20
close reached a new 20 week high within last 16 weeks
average volume(30) between 30000 and 2000000
volume above 20000

Money Flow Index(15) increasing for last 3 days

/* Best when MFI is above 70 but 65 is very good*/
Money Flow Index(15) is above 65
price_ratio between 0.01 and 0.040
ratio between 6 and 40
close above close 8 weeks ago

draw Bollinger Bands(20)
draw MACD Histogram(12,26,9)
add column ratio
add column price_ratio
sort by column 6 descending
draw ratio
]




Gave 2 hits for last Friday. One was MIPS. I'm long MIPS this am at 3.73. Doesn't seem like a great time to be going long this market right now, but will hold this position for a few days and see how it plays out.



decipherlinda
133 posts
msg #79769
Ignore decipherlinda
9/21/2009 12:58:15 PM

Needs update. "Ratio between between" doesn't work.

trendscanner
265 posts
msg #79797
Ignore trendscanner
9/21/2009 5:36:41 PM

Linda, thanks for noticing and letting me know. Updated the filter; hopefully working properly now.

Are you having any luck trading lately? Last week was just a bunch of whipsaws for me. Hoping this week is better.

Good luck trading!

decipherlinda
133 posts
msg #79813
Ignore decipherlinda
9/22/2009 12:13:36 AM

Hi Trendscanner!

Yeah, I had some very good luck in spotting CME just as it pulled up out of consolidation. I've noticed that one common scenario when a stock starts going up is a fairly good sized white candle immediately after, hopefully, a fairly good sized black candle - a la March 10th & more recent times. CME had been consolidating quite a while so a move up after that is a pretty good sign. The longer it's in a squeeze or consolidation, the bigger the move. I bought CME four days ago and made $15 a share. Sold this morning when I got scared at the dip around 10:00 AM so locked in profits. In investing years, I'm like a two year old! Foolish! Sell on the low, buy on the high! Right? Don't mean to sound like you don't know this already, just for a reader who might know.

I watch a simple filter that shows stocks with a black candle one day and a white the next (among a zillion others). JOYG today, so you don't hit the very bottom because, if you're able to watch during the day, you can get in by the time SF updates with today's data. Less risk than buying before the turn up.

As I mentioned here somewhere last week, it's a good idea (according to Dan Fitzpatrick) to wait for a pull up from the squeeze before buying since it can resolve to the downside. IBM just started moving up but pulled back due to the down market we've been having. It's a good stock to buy on its next first white-candle day up. If we're lucky, it will pull down a little more while MA(50) moves up. Buy on the bounce.

Thanks for sharing all your hard work. I've been very interested.



springhill
74 posts
msg #80150
Ignore springhill
9/26/2009 10:58:48 PM

Hello trendscanner,

I found your filter this evening. Have been doing back testing with it. Looks pretty interesting.
Any of the filters found good trades from first part of september til the 21st. Good ones now are harder to come by.

Was wondering if there was to be an update of the filter based on linda's comment above

9/21/2009 12:58:15 PM

Needs update. "Ratio between between" doesn't work.

Thanks for sharing your work.

Frank

trendscanner
265 posts
msg #80163
Ignore trendscanner
9/27/2009 2:05:33 PM

Hi Frank. Yes, I fixed the filter per Linda's comment. If you click on the version above, that's the latest one I've posted.

I've been backtesting various filters, including some variations on the BB squeeze. Worked on a new variation to the BB squeeze today with weekly rsi(2) rising, which from here on I will refer to as the "Hannibal Lecter modification". Haven't found it to be a silver bullet but it has some potential.

So far the only trade I've made based on this filter is MIPS. It hasn't gone anywhere but at least it hasn't lost money.If it doesn't go up this week, will probably close the trade by end of week.

Hope you enjoy the filter. As always, my standard disclaimer applies - the only person that should be reckless enough to trade one of my filters is me. That said, if you trade it or your own modification to it, I'd be interested in knowing how the trade works for you.

Good luck trading!
Dean

StockFetcher Forums · Filter Exchange · Bollinger Band Squeeze 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.