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

Moving Average Moving Sideways in a Tight Range Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mac28rmm
Posted : Friday, January 14, 2011 10:31:45 PM
Gold Customer Gold Customer

Joined: 9/29/2007
Posts: 19
Hi, I am working on a PCF for moving averages moving sideways in a tight range of 5-10 days.   Once I get the general scan, I am fine with adjusting it in terms of days and how tight the range should be.  

I don't know if MAXH10-MINL10<.02 would work if you replaced H and L for XAVGC9.  I don't think it will.

I was thinking of something like...

((XAVGC9<XAVG9.1*1.01) AND (XAVGC9>XAVGC9.1*.99)) AND ((XAVGC9<XAVG9.2*1.01) AND (XAVGC9>XAVGC9.2*.99)) AND
((XAVGC9<XAVG9.3*1.01) AND (XAVGC9>XAVGC9.3*.99)) AND......

so on with as many days as I would want (this would be for a range of 2% total or less).    

Would this work OK, or is there an easier way to set this up?   I am just looking for periods where the MA moves sideways.   Thank you for any guidance you can give.

diceman
Posted : Friday, January 14, 2011 11:10:30 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
This would be a percent change in the average over 5 bars:

(XAVGC9/XAVGC9.5*100)-100

over 10 bars:

(XAVGC9/XAVGC9.10*100)-100

You could put this in a sort column and look for values close to zero. (flat)

You could also put it in an easyscan and use the value sliders to define "tight".


Thanks
diceman



Bruce_L
Posted : Monday, January 17, 2011 10:06:41 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
mac5rmm,
You could use something like the following to check for a Net Difference between the High and Low:

MAX(XAVGC9, 5) - MIN(XAVGC9, 5) < .02

Or something like the following to check for a Percent Difference between the High and the Low:

100 * (MAX(XAVGC9, 5) / MIN(XAVGC9, 5) - 1) < 2

How to create a Personal Criteria Forumula (PCF)
Using EasyScan to find stocks that meet your own criteria
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mac28rmm
Posted : Monday, January 17, 2011 1:02:07 PM
Gold Customer Gold Customer

Joined: 9/29/2007
Posts: 19
Thanks Bruce.   So "MAX(XAVGC9, 5)" is the max of the past five sessions, correct?   If I use that it should certainly make the formula shorter.   I'll try it out. 
Bruce_L
Posted : Monday, January 17, 2011 1:03:20 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Yes, "MAX(XAVGC9, 5)" is the max of the past five sessions.

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