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

20MA within 1% of 50MA on todays close Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
KhaosTrader
Posted : Thursday, August 30, 2012 5:27:22 AM
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.

Bruce_L
Posted : Thursday, August 30, 2012 7:53:39 AM


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
odgarcia
Posted : Thursday, August 30, 2012 8:27:51 AM
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?

Bruce_L
Posted : Thursday, August 30, 2012 9:01:43 AM


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
odgarcia
Posted : Thursday, August 30, 2012 9:36:14 AM
Registered User
Joined: 4/25/2012
Posts: 15

Thank you.

KhaosTrader
Posted : Thursday, August 30, 2012 8:41:54 PM
Registered User
Joined: 1/17/2012
Posts: 15

Thanks Bruce!

Bruce_L
Posted : Friday, August 31, 2012 8:02:53 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.