Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Price & Bollinger Bands Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
bobthekoi
Posted : Thursday, February 7, 2008 3:51:25 PM
Registered User
Joined: 10/27/2005
Posts: 1
Does anyone have a formula that finds stock prices above or below its Bollinger Band?
Bruce_L
Posted : Thursday, February 7, 2008 3:55:03 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Welcome to the forums. A very good foundation for learning how to use TeleChart can be gained by reviewing the following:

If you are new to TeleChart READ THIS FIRST!

The exact formulas depend on your specific Bollinger Band Period and Width settings. The Modelling Bollinger Bands (& Standard Deviation) in a TC PCF topic explains how to create Bollinger Band formulas.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
pywong
Posted : Sunday, March 2, 2008 8:29:39 AM
Registered User
Joined: 9/30/2007
Posts: 12
I do not quite understand the details in the eamil thread you have pointed out.

Would you be able to help provide a formula for bollinger band (20,2)?

Thanks.
Bruce_L
Posted : Monday, March 3, 2008 7:58:11 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
pywong,
If you mean a Period of 20 and a Width of 20 (or 2 Standard Deviations), please try the following:

Upper Bollinger Band 20,20:

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) / 19)

Lower Bollinger Band 20,20:

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) / 19)

If you actually want a Width of 2, change the 2 * in both formulas to .2 * instead. Converting these (as orignially requested by bobthekoi) Price above formulas involves adding C > to the beginning and Price below involves adding C < instead. You may wish to review the following:

How to create a Personal Criteria Forumula (PCF)
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
pywong
Posted : Tuesday, March 4, 2008 1:13:52 AM
Registered User
Joined: 9/30/2007
Posts: 12
Thank you for your help.
Bruce_L
Posted : Tuesday, March 4, 2008 8:03:47 AM


Worden Trainer

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

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tdbroker
Posted : Saturday, March 8, 2008 11:50:33 AM
Registered User
Joined: 1/28/2008
Posts: 19
Hi Bruce

I would like to ask you pretty much what Pywong asked you last week. I am currently using bollinger bands of a 20 bar and 17st dev on a weekly chart. I edit your formula a little bit to

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

but I get 433 stocks, I also rank them by market rank to 80-99 (am I saying that I just would like to see the 20% stocks with the highest position on the upper bollinger bands? or what exactly is the market rank telling me? also since I look at my charts on a weekly basis what type of formula would I need if I am looking for stocks that have been on the upper band for at least 3 weeks
thanks
Andrew

diceman
Posted : Saturday, March 8, 2008 12:27:14 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
You may be interested in this:
 
 
 
 
 
Thanks
diceman
 
 
Bruce_L
Posted : Monday, March 10, 2008 8:25:42 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
tdbroker,
Let's start with the formula. If you are using a Width of 17, you need to change the 2 * to a 1.7 * but you do not need to change the ^ 2 to ^ 1.7 (and should not do so):

Upper Bollinger Band 20,17:

AVGC20 + 1.7 * 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) / 19)

Lower Bollinger Band 20,17:

AVGC20 - 1.7 * 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) / 19)

The other thing about these formulas is that they are value based, not Boolean (they do not return True or False). They will not limit your results in an EasyScan unless you use the EasyScan Rangefinder to limit the Values or Ranks.

When you limit the results to Rank: 80 to 99, you are viewing the symbols with values within the top 20% of the symbols. I don't see this as particularly useful however as the this value is mostly a function of the Price of the stock (and you could just use Price if that's what you wanted).

Using EasyScan to find stocks that meet your own criteria

Can you describe the Condition you want? Does it involve Price relative to the Bollinger Bands (such as being above, below or crossing)? Does it involve the Bollinger Bandwidth?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tdbroker
Posted : Monday, March 10, 2008 2:51:22 PM
Registered User
Joined: 1/28/2008
Posts: 19
Hi Bruce
1- based on your question yes, i would like to use it in relation to price, above or below the band. also if i scan for the lower band shouldn't i get all negative number if i choose marking ranking?    
2- also how would search for stocks that have loss/gain more than 30% of their value after 2 years and have gain a % of that back let's say 20%. (in other words stocks that may be trading sideways)
3- what the ^2 mean on the bollinger band formula?
thanks
Andrew 
Bruce_L
Posted : Monday, March 10, 2008 3:03:23 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (tdbroker)
based on your question yes, i would like to use it in relation to price, above or below the band.

Please try one or more of the following:

Price above Upper Bollinger Band 20,17:

C > AVGC20 + 1.7 * 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) / 19)

Price below Upper Bollinger Band 20,17:

C < AVGC20 + 1.7 * 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) / 19)

Price above Lower Bollinger Band 20,17:

C > AVGC20 - 1.7 * 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) / 19)

Price below Lower Bollinger Band 20,17:

C < AVGC20 - 1.7 * 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) / 19)

QUOTE (tdbroker)
also if i scan for the lower band shouldn't i get all negative number if i choose marking ranking?

No. Market Ranks are Percentile Ranks versus the Market and will run from 0 to 100.

QUOTE (tdbroker)
also how would search for stocks that have loss/gain more than 30% of their value after 2 years and have gain a % of that back let's say 20%. (in other words stocks that may be trading sideways)

I don't understand the question. Please provide a detailed and objective description of the pattern you wish to identify.

QUOTE (tdbroker)
what the ^2 mean on the bollinger band formula?

It raises what's right in front of it to the power of two (it squares what's to its immediate left). The PCF Formula Descriptions topic (already referenced above) covers the syntax of TeleChart's Personal Criteria Formulas in considerable detail.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tdbroker
Posted : Monday, March 10, 2008 4:03:02 PM
Registered User
Joined: 1/28/2008
Posts: 19
Bruce 
wat i was trying to say was for example what formula would you use if you are trying to search for stock that have gone down and then up again showing some almost the same for example
2 years ago the stock was 100 after 6 months it drop close to 70 aand then again 6 months later it went higher closing close to 95 to almost the 100

see i know that C500 is two years of data, but how would you write that C500 lost more 30% after C375 and gain 20 to 25% by C250
Bruce_L
Posted : Tuesday, March 11, 2008 11:09:20 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
tdbroker,
I'm really not sure from your description if this is what you want, but you may wish to try the following:

Price dropped more than 30% between 500 and 375 Periods Ago and increased by more than 20% between 375 and 250 Periods Ago:

C375 / C500 < .7 AND C250 / C375 > 1.2

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