Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

BB Squeeze Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
sagomez66
Posted : Tuesday, November 2, 2010 4:35:13 PM
Registered User
Joined: 7/16/2006
Posts: 41
I've tried to use the condition selection dropdown to create a simple condition for a Bollinger Band Squeeze of less then 10% for example.  If I use .1 in the Less Than Settings box I get everything even negative percent changes of BB.  Is there someway to create a between.  Such as between 0 and 10%.  I've tried the and on a combo condition and that doesn't work...  Do I need to create some realcode for this?

Bruce_L
Posted : Tuesday, November 2, 2010 4:42:18 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I don't understand. Bollinger Bandwidth (which is normally used to define a Bollinger Band Squeeze) can't be negative. How are you defining a Bollinger Band Squeeze?

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:BB Squeeze
'|******************************************************************
'# Percent = UserInput.Integer = 10
'# BB = indicator.Library.Bollinger Bandwidth
If BB.Value < Percent / 100 Then Pass

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sagomez66
Posted : Tuesday, November 2, 2010 4:47:25 PM
Registered User
Joined: 7/16/2006
Posts: 41
I didn't think so either but I assumed that is what I was getting...Thank you for the prompt reply.  Let me play around with what you provided.  Looks like what I was looking for...

Best!
Bruce_L
Posted : Tuesday, November 2, 2010 4:52:29 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sagomez66
Posted : Tuesday, November 2, 2010 4:57:42 PM
Registered User
Joined: 7/16/2006
Posts: 41

Ok...I set it at 1 percent and if I turn on True Markers it marks every bar.  Even in areas where the BB's are clearly diverging...  Doesn't make sense...  I'm expecting that at a 1% bandwidth, I should see markers where there are clear tight squeezes only...

 

Bruce_L
Posted : Tuesday, November 2, 2010 5:04:40 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
What symbol are you using? Have you changed the Bollinger Bandwidth Settings for the Indicator to something besides Std Dev = 2 and BBand Period = 20?

If I change the Percent setting to 1 and leave everything else unchanged, it really doesn't seem to draw any True Markers for most symbols (with symbols such as PHH during the middle of 2007 being exceptions and not particularly common).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sagomez66
Posted : Tuesday, November 2, 2010 5:23:09 PM
Registered User
Joined: 7/16/2006
Posts: 41
Ok...I see what happened.  I will have to play with the how many bars are true settings...

Thanks again Bruce.  Don't mean to be a pain!
sagomez66
Posted : Tuesday, November 2, 2010 5:24:42 PM
Registered User
Joined: 7/16/2006
Posts: 41
I also use a Std Dev of 1 period 30...so that mucks it up a bit...but I think I can get it to a point where I can scan...It's not for daytrading but swings...
sagomez66
Posted : Tuesday, November 2, 2010 5:43:40 PM
Registered User
Joined: 7/16/2006
Posts: 41

Wanted to help anyone else if they read this.  To get this working for me because I use narrow BB's I added an additional set of BB's that use a SD of 3 and played around with the settings to where they worked for my BB's.  I just hid the BB's that I use this indicator for.  Working great now...

Thanks again Bruce!

Bruce_L
Posted : Tuesday, November 2, 2010 7:18:53 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome. I'm happy to read you were able to figure it out.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Art Lindsley
Posted : Wednesday, November 3, 2010 1:20:55 PM
Registered User
Joined: 7/23/2010
Posts: 84
sagomez66  Dan Fitzpatrick gave a fantastic presentation video last night. Well worth viewing. His Telechart  PCF's for BB Squeezes are below the video - see the home page or go to:  Webinar: Trading in the Lame Duck Session   I hope he is brought back again sometime.

Bruce could Dan's pcfs be converted to SF5 for us? 

Luck to ya
Art
Bruce_L
Posted : Wednesday, November 3, 2010 1:32:27 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The first Personal Criteria Formula has already been effectively converted in my Tuesday, November 02, 2010 4:42:18 PM ET post. Just leave all of the defaults but change the Percent from 10 to 6.

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:BB Squeeze
'|******************************************************************
'# Percent = UserInput.Integer = 6
'# BB = indicator.Library.Bollinger Bandwidth
If BB.Value <= Percent / 100 Then Pass

The second formula given could be done as follows:

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Second Formula
'|******************************************************************
'# Bpb = indicator.Library.Bollinger b
'# BBw = indicator.Library.Bollinger Bandwidth
If System.Math.Abs(Price.AVGC(20) / Price.AVGC(50)) / Price.AVGC(50) _
 <= .08 * Price.Last AndAlso _
 BBw.Value <= .06 AndAlso Bpb.Value > 100 Then Pass

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Art Lindsley
Posted : Wednesday, November 3, 2010 3:16:40 PM
Registered User
Joined: 7/23/2010
Posts: 84
You sure can do that code good Bruce. Thank You Very Much
art
sagomez66
Posted : Wednesday, November 3, 2010 4:43:03 PM
Registered User
Joined: 7/16/2006
Posts: 41
This is great!  Much appreciated Art and Bruce!  This is what makes these forums so valuable!  I will definitely use this!
OptionPaul
Posted : Friday, November 5, 2010 2:11:01 PM
Registered User
Joined: 10/7/2004
Posts: 11
Bruce:  Thank you for all you do for the Worden community.  I greatly appreciate your help.  I have succesfully implemented the formulas you provided on Nov 3rd to identify BB Sq breakouts to the upside.  I am having a brain-cramp and can't figure out how to adjust the formula to show downside breakouts.  Can you help?  Thanks again
Bruce_L
Posted : Friday, November 5, 2010 2:13:53 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I'm suspecting you just want to change:

Bpb.Value > 100

To:

Bpb.Value < 0

I'm not exactly sure what the first portion is supposed to do (the structure doesn't anything I would think of doing on my own). I just copied it directly from the Personal Criteria Formula. So if that needs to be changed, I don't know what changes would need to be made (but suspect none based on the use of the absolute value function).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
OptionPaul
Posted : Friday, November 5, 2010 4:44:45 PM
Registered User
Joined: 10/7/2004
Posts: 11
Thank you
Art Lindsley
Posted : Saturday, November 6, 2010 12:10:59 PM
Registered User
Joined: 7/23/2010
Posts: 84
QUOTE (Bruce_L)
The first Personal Criteria Formula has already been effectively converted in my Tuesday, November 02, 2010 4:42:18 PM ET post. Just leave all of the defaults but change the Percent from 10 to 6.

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:BB Squeeze
'|**************

The second formula given could be done as follows:

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Second Formula
'|******************************************************************
'# Bpb = indicator.Library.Bollinger b
'# BBw = indicator.Library.Bollinger Bandwidth
If System.Math.Abs(Price.AVGC(20) / Price.AVGC(50)) / Price.AVGC(50) _
 <= .08 * Price.Last AndAlso _
 BBw.Value <= .06 AndAlso Bpb.Value > 100 Then Pass


I tried to change the <=.08  to .02 hoping that would show the bb breakouts closer to the SMA50 (within 2%).  However the same true markers were displayed. Could you show me how to make that change please?
Bruce_L
Posted : Monday, November 8, 2010 3:47:06 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Art Lindley,
No, I can't.

QUOTE (Bruce_L)
I'm not exactly sure what the first portion is supposed to do (the structure doesn't anything I would think of doing on my own). I just copied it directly from the Personal Criteria Formula. So if that needs to be changed, I don't know what changes would need to be made...

If I were going to write something on my own, it would look quite different. For example, that the Price is within 8% of the 50-Period Simple Moving Average would look something like the following:

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Second Formula
'|******************************************************************
'# Bpb = indicator.Library.Bollinger b
'# BBw = indicator.Library.Bollinger Bandwidth
If System.Math.Abs(Price.Last / Price.AVG(50) - 1) <= .08 AndAlso _
 BBw.Value <= .06 AndAlso Bpb.Value > 100 Then Pass

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Art Lindsley
Posted : Monday, November 8, 2010 4:18:58 PM
Registered User
Joined: 7/23/2010
Posts: 84
Thanks Bruce. Worked good.

art
Bruce_L
Posted : Monday, November 8, 2010 4:21:03 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.