Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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.
|
|
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
|
|
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?
|
|
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
|
|
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.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |