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 |

Price above moving averages Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
spiker
Posted : Tuesday, July 31, 2007 9:03:45 PM
Registered User
Joined: 12/2/2004
Posts: 15
I'm trying to create a PCF where price is above the 20ema and the 20ema is at or above the 50ema and the 50ema is at or above the 200ema. Here's what I came up with but my sort when using this does not produce what I'm looking for. Can someone help please?

C > (XAVGC20 > XAVGC50 AND C > XAVGC200)

Also if I was looking for a timeframe where the 20ema has been at or above the 50ema which has been at or above the 200 ema for a period of 10 (maybe 20 days) how would I modify my formula?
diceman
Posted : Tuesday, July 31, 2007 9:20:29 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
Try this:

C>XAVGC20ANDXAVGC20>XAVGC50ANDXAVGC50>XAVGC200


If you put a true false condition inside the ABS() function it will
equal 1 if true and 0 if false. You can use this to "count" the
days.

ABS(XAVGC20>XAVGC50ANDXAVGC50>XAVGC200)

(today's value)

ABS(XAVGC20.1>XAVGC50.1ANDXAVGC50.1>XAVGC200.1)

(yesterdays value)

If you do that for 10 days. You will get the count you need.

ABS(today)+ABS(yesterday)+ABS(the day before yesterday)
and so on.

When it equals zero the condition in not true.
When it equals 3 the condition has been true for 3 days.
When it equals 10 you will have the stocks that have been
rue for 10 days.

Thanks
diceman

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.