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 |

Formula to get the value of today's upper and lower bollinger band value Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mcubas
Posted : Wednesday, January 30, 2013 12:36:58 PM
Registered User
Joined: 4/7/2011
Posts: 69

Hi Bruce,

Do you have any formula to get the value for today's top and bottom bollinger band values (Period 20, st. dev 2).

thanks!

 

Martin

Bruce_L
Posted : Wednesday, January 30, 2013 12:41:08 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

An Indicator Formula for the Simple Upper Bollinger Band 20, 2.00 could be written as:

AVGC20 + 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20)

And an Indicator Formula for the Simple Lower Bollinger Band 20, 2.00 could be written as:

AVGC20 - 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20)

Modelling Bollinger Bands (& Standard Deviation) in a TC PCF

That said, it is usually just easier to click on the Bollinger Bands and select Create Scan Condition or Show value in WatchList than to create a formula.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mcubas
Posted : Wednesday, January 30, 2013 12:46:14 PM
Registered User
Joined: 4/7/2011
Posts: 69

Thanks Bruce, That is just what I needed!

slriggs3
Posted : Wednesday, February 13, 2013 4:44:10 PM
Registered User
Joined: 12/10/2010
Posts: 2

Bruce, I would like to know if a formula is possible to write (H1-L1) / (Yesterdays high BB-Yesterdays low BB) with the answer able to be put in a colum as a %  ?

Bruce_L
Posted : Wednesday, February 13, 2013 4:54:01 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If the Bollinger Bands are the same Simple Bollinger Bands 20, 2.00 used above, then an Indicator Formula for this could be written as:

100 * (H1 - L1) / (4 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 - 20 * AVGC20.1 ^ 2) / 20))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
proguildsocial
Posted : Tuesday, February 26, 2013 10:30:53 PM
Registered User
Joined: 2/27/2011
Posts: 3

Bruce, thanks for your BB code on 1/31/13.  But it seems that you just repeated the upper BB code and did not give the code for the lower BB.  You wrote: 

An Indicator Formula for the Simple Upper Bollinger Band 20, 2.00 could be written as:

 

AVGC20 + 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20)

And an Indicator Formula for the Simple Lower Bollinger Band 20, 2.00 could be written as:

AVGC20 - 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20)

Would you please post the code for the lower BB?  

NOTE: as far as I can tell one could not create a scan using the chart system for a stock opening above an upper BB and closing below it.  So it seems a PCFs would be needed.

Bruce_L
Posted : Wednesday, February 27, 2013 8:24:44 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The second formula was not a repeat of the first formula and it produces different results (they were both labeled as Upper however). The first formula has a + after AVGC20 and the second formula has a - after AVGC20.



-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.