Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/1/2010 Posts: 28
|
Hi Bruce L.,
Can you show me the code for the 8 exponential and 34 exponential moving average crossover?
I'm interested in building an Easy Scan that will locate the crossover (either direction) within the last 1 or 2 days.
I'd like to use it to see the actual moving averages crossing on end of day charts.
Thanks,
Fred
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for the 8-Period Exponential Moving Average of price crossing through the 34-Period Exponential Moving Average of price in either direction could be written as:
SGN(XAVGC8 - XAVGC34) <> SGN(XAVGC8.1 - XAVGC34.1)
This would specifically be looking for a crossover between the previous bar and the current bar. If you wanted to check for this or for a crossover between 2-bars ago and 1-bar ago we would get:
SGN(XAVGC8 - XAVGC34) <> SGN(XAVGC8.1 - XAVGC34.1) OR SGN(XAVGC8.1 - XAVGC34.1) <> SGN(XAVGC8.2 - XAVGC34.2)
Allowing for the crossover to have happened between 3-bars ago and 2-bars ago as well would result in:
SGN(XAVGC8 - XAVGC34) <> SGN(XAVGC8.1 - XAVGC34.1) OR SGN(XAVGC8.1 - XAVGC34.1) <> SGN(XAVGC8.2 - XAVGC34.2) OR SGN(XAVGC8.2 - XAVGC34.2) <> SGN(XAVGC8.3 - XAVGC34.3)
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: 11/1/2010 Posts: 28
|
Hi Bruce L,
Your code worked great. I "ORed" all 3 in one easy scan I named 8_34_xovr123 and am seeing very good results.
Thanks again,
Fred
|
|
Registered User Joined: 6/28/2005 Posts: 9
|
Hello, I am trying to create a scan with the following conditions:
1. Close today should be above the 30-wk. moving average
2. The Close today should be al least 1.8 times the lowest the stock traded in the last 250 days.
3. The 4-wk moving average to be greater than the 10-wk moving average and the 10-wk moving average greater than the 30-wk moving average
Thank you.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you are willing to substitute 5-trading days for a week you could create a single Daily Condition Formula similar to the following:
C > AVGC150 AND C >= 1.8 * MINL250 AND AVGC20 > AVGC50 AND AVGC50 > AVGC150
If you want to use actual calendar weeks then you would need to create a Daily Condition Formula:
C >= 1.8 * MINL250
And a Weekly Condition Formula:
C > AVGC30 AND AVGC4 > AVGC10 AND AVGC10 > AVGC30
And use both Condition Formulas in the same EasyScan as EasyScan Conditions.
Personal Criteria Formula Conditions
EasyScan Basics
EasyScan Expanded
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |