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 |

PCF for %BB(20,2) < X for N days in a row Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
william.boote
Posted : Wednesday, July 10, 2013 11:11:20 AM
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
Bruce_L
Posted : Wednesday, July 10, 2013 11:29:44 AM


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
william.boote
Posted : Wednesday, July 10, 2013 11:40:17 AM
Registered User
Joined: 2/19/2011
Posts: 33
Thank YOU, I suspected that there was an easier way.
srinibalram
Posted : Wednesday, July 10, 2013 2:12:17 PM
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

Bruce_L
Posted : Wednesday, July 10, 2013 2:15:57 PM


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