Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/13/2005 Posts: 16
|
Would appreciate assistance with the following 2 PCF's:(1). Todays price range crosses the Upper BB (20 ma, 2 standard deviations) AND today's closing price is in the upper 25% of today's range.(2). The converse of # 1: Today's price range crosses the lower BB (20 ma, 2 standard deviations) AND today's closing price is in the lower 25% of today's range.Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (cheddarjim) Todays price range crosses the Upper BB (20 ma, 2 standard deviations) AND today's closing price is in the upper 25% of today's range.
Please try the following:
C > 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) AND C1 <= 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) AND (C - L) / (H - L + .00001) >= .75
QUOTE (cheddarjim) he converse of # 1: Today's price range crosses the lower BB (20 ma, 2 standard deviations) AND today's closing price is in the lower 25% of today's range.
Please try the following:
C < 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) AND C1 >= 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) AND (C - L) / (H - L + .00001) <= .25
You may wish to review the following:
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
Understanding Stochastics
How to create a Personal Criteria Forumula (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: 1/13/2005 Posts: 16
|
Hi Bruce,I pasted the 2 formulas above into PCF's, then created 2 Easy Scans of All Items in System. Running the scans resulted in no items. Just eyeballing a list of stocks hitting new highs today (1/25/10), I found that TKTM, FRB, and NRGP met the criteria of the first formula. When I look at Formula 1, I notice the Close is referenced many times, but not the High or Low, which are necessary to get the range. Am I missing something here?Jim
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I think we were both missing something. I was missing that you were looking for the Bollinger Bands to intersect the Price Bars instead of Price crossing through Price and you were missing that a Stochastic allows for range calculations without using the High or Low. Please try the following instead:
QUOTE (Bruce_L) [QUOTE=cheddarjim]Todays price range crosses the Upper BB (20 ma, 2 standard deviations) AND today's closing price is in the upper 25% of today's range.
Please try the following:
ABS(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) - (H + L) / 2) <= (H - L) / 2 AND (C - L) / (H - L + .00001) >= .75
QUOTE (cheddarjim) he converse of # 1: Today's price range crosses the lower BB (20 ma, 2 standard deviations) AND today's closing price is in the lower 25% of today's range.
Please try the following:
ABS(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) - (H + L) / 2) <= (H - L) / 2 AND (C - L) / (H - L + .00001) <= .25
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 17
|
I just tried the first of these and got zero candidates.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I replaced the 1-Period Stochastics in the formulas with a manual expansion. Please try it again with the newer versions.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 17
|
Thanks, that did it.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |