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

Days above moving average Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tkamada
Posted : Wednesday, February 27, 2019 2:08:28 AM
Registered User
Joined: 3/31/2011
Posts: 68

I am trying to create a PCF for how many days (periods) a stock is trading above the 30-day EMA. I tried this, but it did not work. Can you please show me the correct PCF?

TrueInRow(C>XAVGC34)

Thank you.

 

Bruce_L
Posted : Wednesday, February 27, 2019 6:58:50 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Well other than changing the 34 to 30 (assuming 30 is actually what you want), it should work.

TrueInRow(C > XAVGC30)

Although if you want the entire bar above the moving average you would use the low instead of the current or closing price.

TrueInRow(L > XAVGC30)

What happens when you try?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tkamada
Posted : Wednesday, February 27, 2019 9:39:33 AM
Registered User
Joined: 3/31/2011
Posts: 68

Bruce,

When I try it, I get this message: "Error in formula  Missing Period Argument At position 22."

QUOTE (Bruce_L)

Well other than changing the 34 to 30 (assuming 30 is actually what you want), it should work.

TrueInRow(C > XAVGC30)

Although if you want the entire bar above the moving average you would use the low instead of the current or closing price.

TrueInRow(L > XAVGC30)

What happens when you try?

Bruce_L
Posted : Wednesday, February 27, 2019 9:43:50 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Yes, sorry, it does in fact need a period. So:

TrueInRow(C > XAVGC30, 50)

For example would max out at a result of 50 bars.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tkamada
Posted : Wednesday, February 27, 2019 9:47:05 AM
Registered User
Joined: 3/31/2011
Posts: 68

Bruce: I appreciate your help.

 

QUOTE (Bruce_L)

Yes, sorry, it does in fact need a period. So:

TrueInRow(C > XAVGC30, 50)

For example would max out at a result of 50 bars.

Bruce_L
Posted : Wednesday, February 27, 2019 9:50:09 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



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