Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Gold Customer
Joined: 7/21/2007 Posts: 32
|
How would I write a PCF that would filter for stocks with minimum BBW 10,2 over the last month less than 0.2?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Add Donchian Channels to a Bollinger Bandwidth indicator with the desired settings. Set the Offset of the Doncian Channels to 0 and the Period to a month (21 is usually pretty good for this in daily).
How to add an indicator to a chart template
How to edit an Indicator
You can then click on the Donchian Channels and select Create Scan Condition to create a condition for Chan Bottom - Less Than 0.2.
Create Conditions from Your Chart (5:25)
While it is theoretically possible to create a Condition Formula for this using the techniques in the Modelling Bollinger Bands (& Standard Deviation) in a TC PCF and Min Max PCFs topics, the resulting Condition Formula would be way too long and slow to be practical or post in the forums.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 7/21/2007 Posts: 32
|
Thanks Bruce.
I had to look up Donchian Channels. I had never used it before. It gives me something that I have been looking for, for a while, the min and max functions for indicatiors other than the ones available in a PCF.
Are there any plans to make the functions and prior bar references available to all indicatiors? Even better would be the ones I have created!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you mean the Personal Criteria Formula Language, I am not aware of any plans to upgrade the language at this time.
You can generally add a 1 period moving average to an indicator and set the Offset to the desired number of bars ago to plot the past value of an indicator at the current bar. You can then click on the offset moving average and select Create Scan Condition to create conditions for past values instead of current values.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 12/7/2004 Posts: 107
|
how, exactly, do you add doncian chan to BB. I was unable to do it.
clicking the green plus only allows adding to price plot, clicking BB-edit or change data source shows BB grayed out, unable to add to BB.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
While you can add Donchian Channels to the Bollinger Bandwidth indicator as described in my original response, it is not possible to add Donchian Channels to Bollinger Bands.
About the best you could do would be to a Custom PCF Indicator to match the value of the upper, center or lower Bollinger Band and then add the Donchian Channels to the Custom PCF Indicator.
In the case of the simple Bollinger Bands 10, 2.00, the upper Bollinger Band could be written as follows.
AVGC10 + 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 - 10 * AVGC10 ^ 2) / 10)
The center Bollinger Band could be written as follows.
AVGC10
And the lower Bollinger Band could be written as follows.
AVGC10 - 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 - 10 * AVGC10 ^ 2) / 10)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 7/21/2007 Posts: 32
|
Your mastery of PCL is impressive. I was going to warn you about getting a big head but then I looked at your picture and realized I was too late! (-:
Thanks again.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |