Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

pcf 8dma xing 20dma within past two days Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Chuck/Las Vegas
Posted : Monday, February 28, 2011 9:53:20 PM
Registered User
Joined: 12/13/2004
Posts: 4
I have a pcf for 8dma xing 20dma which works fine, but I want it to show only crossovers in the past two days. This part I cannot seem to do.  Any help would be appreciated.  Tnx.
Bruce_L
Posted : Tuesday, March 1, 2011 10:37:55 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
A formula for the 8-Period Simple Moving Average crossing up through the 20-Period Simple Moving Average could be written as:

AVGC8 > AVGC20 AND AVGC8.1 <= AVGC20.1

So a formula for this happening within the most recent two Bars could be written as:

(AVGC8 > AVGC20 AND AVGC8.1 <= AVGC20.1) OR (AVGC8.1 > AVGC20.1 AND AVGC8.2 <= AVGC20.2)

A formula for the 8-Period Simple Moving Average crossing down through the 20-Period Simple Moving Average could be written as:

AVGC8 < AVGC20 AND AVGC8.1 >= AVGC20.1

So a formula for this happening within the most recent two Bars could be written as:

(AVGC8 < AVGC20 AND AVGC8.1 >= AVGC20.1) OR (AVGC8.1 < AVGC20.1 AND AVGC8.2 >= AVGC20.2)

A formula for the 8-Period Simple Moving Average crossing through the 20-Period Simple Moving Average in either direction could be written as:

SGN(AVGC8 - AVGC20) <> SGN(AVGC8.1 - AVGC20.1)

So a formula for this happening within the most recent two Bars could be written as:

SGN(AVGC8 - AVGC20) <> SGN(AVGC8.1 - AVGC20.1) OR SGN(AVGC8.1 - AVGC20.1) <> SGN(AVGC8.2 - AVGC20.2)

If either or both of the Moving Averages are Exponential instead of Simple, you would need to change each instance of:

AVGC

In the formula for any Exponential Moving Average in the formula to:

XAVGC

Moving Average PCF Templates
Things to check if your moving averages don't "seem right" or "seem to match"
How to create a Personal Criteria Forumula (PCF)
Using EasyScan to find stocks that meet your own criteria
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

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