Registered User Joined: 2/19/2011 Posts: 33
|
As an example, please provide or help with a PCF to scan for stocks with a %B(20,2) below 0.20 for 3 days in a row. Thank You
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It is possible to create this as a Condition Formula because N is relatively short. That said, it is a pretty inefficient way of doing what you want.
(C - AVGC20) / 4 / 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) < -.3 AND (C1 - AVGC20.1) / 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) < -.3 AND (C2 - AVGC20.2) / 4 / SQR(ABS(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 + C21 ^ 2 - 20 * AVGC20.2 ^ 2) / 20) < .3
A better approach which results in a formula where N can be adjusted is to use the first part of the formula as the Boolean Formula in a Custom PCF % True Indicator.
(C - AVGC20) / 4 / 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) < -.3
Then set the Period of the Custom PCF % True Indicator to 3 and the Average Type to Simple. The Custom PCF % True Indicator will return 100% when the Boolean Formula is true for all of the three most recent bars.
This allows you to click on the Custom PCF % True Indicator and select Create Scan Condition to check for the value to be greater than 99.9 to create the desired Condition.
You can adjust N by adjusting the Period of the Custom PCF % True Indicator. You would need to change the formula to adjust X, or the settings of the Bollinger %B indicator.
Adding and Moving Indicators
Create Conditions from Your Chart
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 2/19/2011 Posts: 33
|
Thank YOU, I suspected that there was an easier way.
|
Registered User Joined: 3/11/2012 Posts: 13
|
HI Bruce,
Request your help.
Is there a PCF that measures the the distance (values) between a TRIX 12 and a Moving Average 9, like we have between a MA 21 and a MA 50 for example.It will be great if you could help with this PCF?
Thank you.
Srini
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I cannot think of a way to do this. As stated in my previous responses in the PCF for TRIX in TC2000 topic where you ased this question last week, formula for the TRIX and its Moving Average Signal Line are too long and slow to be practical or post in the forums. If it cannot be done by clicking on TRIX and selecting Show Values in WatchList or Create Scan Condition, then we can't create a PCF to work around it.
Learn how to use the forums: post a new topic, reply, Search existing topics
-Bruce Personal Criteria Formulas TC2000 Support Articles
|