Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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.
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
Guest-1 |