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 |

EXP Moving Averages Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
davidy
Posted : Sunday, September 30, 2007 11:58:26 AM
Registered User
Joined: 3/5/2005
Posts: 30
I have been trying to write a PCF for the following, with no success. Basically want to screen for the exponential 10 MA crossing the Exp 21 MA crossing the Exp 50 MA. Thanks. It's just beyond my PCF level!
Bruce_L
Posted : Monday, October 1, 2007 10:04:26 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Let's start with some of the possible components:

EMA10 xUp EMA21:

XAVGC10 > XAVGC21 AND XAVGC10.1 <= XAVGC21.1

EMA10 xDown EMA21:

XAVGC10 < XAVGC21 AND XAVGC10.1 >= XAVGC21.1

EMA10 crossing EMA21 (either direction):

SGN(XAVGC10 - XAVGC21) <> SGN(XAVGC10.1 - XAVGC21.1)

EMA10 xUp EMA50:

XAVGC10 > XAVGC50 AND XAVGC10.1 <= XAVGC50.1

EMA10 xDown EMA50:

XAVGC10 < XAVGC50 AND XAVGC10.1 >= XAVGC50.1

EMA10 crossing EMA50 (either direction):

SGN(XAVGC10 - XAVGC50) <> SGN(XAVGC10.1 - XAVGC50.1)

EMA21 xUp EMA50:

XAVGC21 > XAVGC50 AND XAVGC21.1 <= XAVGC50.1

EMA21 xDown EMA50:

XAVGC21 < XAVGC50 AND XAVGC21.1 >= XAVGC50.1

EMA21 crossing EMA50 (either direction):

SGN(XAVGC21 - XAVGC50) <> SGN(XAVGC21.1 - XAVGC50.1)

The final form of "exponential 10 MA crossing the Exp 21 MA crossing the Exp 50 MA" depends on the cross directions and the timing. Do the crosses happen simultaneously? If not, over what time period can the crossses happen and does the order matter?

You may wish to review the following:

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

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
davidy
Posted : Thursday, October 18, 2007 7:43:04 PM
Registered User
Joined: 3/5/2005
Posts: 30
Bruce -
Thanks for the PCF for the 10 day crossing the 21.  However, I want to limit it to crossing in the last 2-3 days.  What do I need to add?
Bruce_L
Posted : Friday, October 19, 2007 8:35:59 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
All of the formulas provided detect crossovers between the last period and the current period. If your response is indicating that the crossovers being detected happened longer ago than the most recent period, you may wish to review the following topic again:

Things to check if your moving averages don't "seem right" or "seem to match"

If, on the other hand, you wish to extend the period over which crossovers are detected from a single period to as many as three periods, you may wish to try one of the following formulas EMA10 crossing EMA21 instead:

EMA10 xUp EMA21 (and stays there):

XAVGC10 > XAVGC21 AND (XAVGC10.1 <= XAVGC21.1 OR XAVGC10.2 <= XAVGC21.2 OR XAVGC10.3 <= XAVGC21.3)

EMA10 xDown EMA21 (and stays there):

XAVGC10 < XAVGC21 AND (XAVGC10.1 >= XAVGC21.1 OR XAVGC10.2 >= XAVGC21.2 OR XAVGC10.3 >= XAVGC21.3)

EMA10 crossing EMA21 (either direction):

SGN(XAVGC10 - XAVGC21) <> SGN(XAVGC10.1 - XAVGC21.1) OR SGN(XAVGC10.1 - XAVGC21.1) <> SGN(XAVGC10.2 - XAVGC21.2) OR SGN(XAVGC10.2 - XAVGC21.2) <> SGN(XAVGC10.3 - XAVGC21.3)

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