Registered User Joined: 5/18/2009 Posts: 3
|
How would I write PCF for 10 ma( simple and expenential ) above 35 ma.Also, how would I write another PCF for increasing distance between 10 ma and 35 ma.
Thanks.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Welcome to the forums. A very good foundation for learning how to use TeleChart can be gained by reviewing the following:
If you are new to TeleChart READ THIS FIRST!
SMA10 above SMA35:
AVGC10 > AVGC35
EMA10 above EMA35:
XAVGC10 > XAVGC35
SMA10 above EMA35:
AVGC10 > XAVGC35
EMA10 above SMA35:
XAVGC10 > AVGC35
There are actually lots more possibilities if we start having both Simple and Exponential versions of one or both Moving Averages. I'm going to use Simple Moving Averages for the increasing distance formula, but you can convert a Simple Moving Average to an Exponential Moving Average by putting an X in front of it.
ABS(AVGC10 - AVGC35) > ABS(AVGC10.1 - AVGC35.1)
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"
PCF Formula Descriptions
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 5/18/2009 Posts: 3
|
Greeting Bruce,
Could you please write me a PCF for closing price that is within 1% to 5% of its 50 SMA.
Thanks
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for price being within 1% of its 50 SMA can be written as:
ABS(C / AVGC50 - 1) <= .01
A Condition Formula for price being within 5 of its 50 SMA can be written as:
ABS(C / AVGC50 - 1) <= .05
A Condition Formula for price being from 1% to 5% above its 50 SMA can be written as:
1.01 * AVGC50 <= C AND C <= 1.05 * AVGC50
A Condition Formula for price being from 1% to 5% below its 50 SMA can be written as:
.95 * AVGC50 <= C AND C <= .99 * AVGC50
-Bruce Personal Criteria Formulas TC2000 Support Articles
|