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

filter Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
caseyliska
Posted : Wednesday, August 16, 2006 11:47:54 AM
Registered User
Joined: 12/30/2005
Posts: 6
I want to build a filter that will find stocks/markets meeting the following criteria:


1. lower bollinger band (20 bar, 2 std dev) > 95% of 50 Day Simple moving avg.


2. lower bollinger band (20 bar, 2 std dev, I would like to know the 5 day avg slope. I would like to find stocks who's slopes have gone from pos to neg


I would like to know the slopes of both the 200 and 50 day simple moving avg. I would setup a condition base on these slopes.

the most important criteria is the 1st.

Thanks for your help,

casey liska
Bruce_L
Posted : Wednesday, August 16, 2006 12:34:10 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (caseyliska)
lower bollinger band (20 bar, 2 std dev) > 95% of 50 Day Simple moving avg.

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) > .95 * AVGC50

QUOTE (caseyliska)
lower bollinger band (20 bar, 2 std dev, I would like to know the 5 day avg slope.

I'm not quite sure how you want to define the 5-Period Average of slope, or slope for that matter. The slope of the segment between today's value and yesterday's value is just the 1-Period Rate of Change. The simplest way to define the slope of the point itself might be the average of the segments before and after that point. Then again, you might be asking for the 5-Period Linear Regression of the Bollinger Band. The following should be the average of the slopes of the last 5 segments (which turns out to just be the 5-Period Rate of Change divided by five):

(AVGC20 - AVGC20.5 - 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) + 2 * SQR(ABS(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 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 - 20 * AVGC20.5 ^ 2) / 19)) / 5

QUOTE (caseyliska)
I would like to find stocks who's slopes have gone from pos to neg

Using the same segment to segment definition used above (based on Rate of Change):

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) < 0 AND AVGC20.1 - 2 * 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) / 19) > 0

QUOTE (caseyliska)
I would like to know the slopes of both the 200 and 50 day simple moving avg.

1-Period Rate of Change of 200-Period Simple Moving Average:
AVGC200 - AVGC200.1

1-Period Rate of Change of 50-Period Simple Moving Average:
AVGC50 - AVGC50.1

All of these Personal Criteria Formulas could be used as EasyScan Conditions. You may wish to review the following:

How to create a Personal Criteria Forumula (PCF)
Using EasyScan to find stocks that meet your own criteria
Handy PCF example formulas to help you learn the syntax of PCFs!
Personal Criteria Language Function List
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
caseyliska
Posted : Wednesday, August 16, 2006 4:01:38 PM
Registered User
Joined: 12/30/2005
Posts: 6
Thanks for your help Bruce.

I installed the 1st formula into PCF, and see that the lower bollinger band, 20d avg, 2 std dev doesn't always meet the criteria of being w/in 95% of the 50day moving avg on the charts. I see the the std dev is subtracted from the 20day moving avg in your formula, so I am puzzled as to why it's not working.

I changed the criteria to > 50DMA, to be sure, still is not meeting criteria?

Thanks again in advance Bruce
caseyliska
Posted : Wednesday, August 16, 2006 4:06:11 PM
Registered User
Joined: 12/30/2005
Posts: 6
Bruce,

I see my mistake, the formula was not updated.

The formula works great.

thanks again,

casey
Bruce_L
Posted : Wednesday, August 16, 2006 4:14:09 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome. I'm happy to read it is working as expected.

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