Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 6/15/2011 Posts: 54
|
How can I write a Pcf for the bollinger band width expressed as a percentage of closing price.
This is available as an indicator but how do I convert it expressed as a percentage of price ?
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The available indicator is expressed as a ratio of the difference between the Upper Bollinger Band and Lower Bollinger Band to the Bollinger Band Centerline.
Since the Bollinger Band Centerline is a Moving Average of Price (at least if the BB is applied to Price), you could multiply the result by 100 in your head to get Bollinger Bandwidth expressed as a Percentage of Average Price.
An Indicator Formula to express Bollinger Bandwidth 20,2.00 as a Percentage of the current Price could be written as:
400 * 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) / C
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/15/2011 Posts: 54
|
Hi Bruce you seem to have multiplied the above formula by 400 instead of 100 .Or am I reading something wrong?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Yes, I multiplied the formula by 400. The Upper Bollinger Band 20,2.00 is the centerline plus 2 times the Standard Deviation (that's what the 2.00 in the settings represents). The Lower Bollinger Band 20,2.00 is the centerline minus 2 times the Standard Deviation. So the raw Bollinger Bandwidth is 4 times the Standard Deviation. Expressing this as a percentage of Price involves multiplying this by 100 (so we get 4 times 100 or 400) and dividing by price.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/15/2011 Posts: 54
|
Thanks
|
|
Registered User Joined: 12/12/2004 Posts: 60
|
Is there a pcf for bollinger bands expansion and contraction
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You can add a Bollinger Bandwidth indicator with the same settings as the Bollinger Bands of interest. Then click on the Bollinger Bandwidth indicator and select Create Scan Condition and choose one of the Moving Down conditions. Which one and the particular settings would be up to you.
Create Conditions from Your Chart
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |