Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/17/2012 Posts: 15
|
Hi,
How do I write a scan that will show stocks where the 20ma and 50 ma are within 1% of each other? It doesnt matter if the which MA is on top.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for the 20-Period Simple Moving Average being within 1% of the 50-Period Simple Moving Average as stated in the title is straightforward:
ABS(AVGC20 / AVGC50 - 1) <= .01
You would need to check to make sure both possibilities are true however if they need to be within 1% of each other because it would theoretically be possible for the 20-Period Simple Moving Average to be within 1% of the 50-Period Simple Moving Average but not have the 50-Period Simple Moving Average be within 1% of the 20-Period Simple Moving Average if the 20-Period Simple Moving Average is lower than the 50-Period Simple Moving Average:
AVGC20 <= 1.01 * AVGC50 AND AVGC50 <= 1.01 * AVGC20
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 4/25/2012 Posts: 15
|
Hi,
How could you convert the relationship betwen the same two moving averages (20-sma and 50-sma) into an oscillator?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Just add a Price Percent Oscillator (PPO) to the chart with the following settings:
- Short Period: 20
- Long Period: 50
- Average Type: Simple
Or if you want to continue using the absolute value:
100 * ABS(AVGC20 / AVGC50 - 1)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 4/25/2012 Posts: 15
|
Thank you.
|
|
Registered User Joined: 1/17/2012 Posts: 15
|
Thanks Bruce!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |