Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/30/2005 Posts: 7
|
I want to find stock prices when they cross the 50 sma Thanks Donna
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Try this:
ABS(SGN(C-AVGC50)-SGN(C1-AVGC50.1))>0
You may be interested in the following topic and videos:
Create PCFs and EasyScans to find moving average crossovers How to create a Personal Criteria Forumula (PCF) Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
Hi Bruce,
There are many ways to write a PCF formula where price moves UP or DOWN the Simple Moving Average (SMA), there are math formulas and there are Boolean formulas. My question is:
1.Are there any other math operator functions besides the ABS and SGN types I noted below that can do the same thing?
2.Which are best to use, I personally use the simple math formula with the sliding scale, but the Boolean formulas are also good. Why use the SGN versus the ABS and what advantages/disadvantages does the math formula have over the Boolean formulas?
Looking forward to your reply.
Thanks Winnie
Math Formulas Price vs MA50 / (AVGC50) * 100
Boolean Formulas Price Crossing Up SMA50 Today (AVGC50.1 > C1.1) AND (AVGC50 < C)
Price Crossing Down SMA50 Today (AVGC50.1 < C1.1) AND (AVGC50 > C)
Price Crossing Up SMA50 Today ABS(SGN(C-AVGC50)-SGN(C1-AVGC50.1))>0
Price Crossing Down SMA50 Today ABS(SGN(C-AVGC50)-SGN(C1-AVGC50.1))<0
Price Crossing Up SMA50 Today SGN(C-AVGC50)-SGN(C1-AVGC50.1)>0
Price Crossing Down SMA50 Today SGN(C-AVGC50)-SGN(C1-AVGC50.1)<0
|
|
Registered User Joined: 10/7/2004 Posts: 1,006
|
Bruce, the math formula should be as follows, I don't know how the icon got in there, my mistake.
C / (AVGC50) * 100
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
I prefer no boolean. I believe it gives you more versitile PCFs that make good criteria to scan with and GREAT criteria to sort with.
There are minor calculation differences with using SGN but they are minor in a formula like the above.
Use what makes the most sense to you.
Have you ever checked out this video?
Constructing more versatile and reusable Personal Criteria Formulas
- Craig Here to Help!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Winnie, There are lots of ways to write crossover formulas. Any list I could come up with wouldn't be exhaustive. I like to post:
ABS(SGN(C-AVGC50)-SGN(C1-AVGC50.1))>0
because it is slightly shorter than:
(AVGC50.1>C1.1 AND AVGC50<C) OR (AVGC50.1<C1.1 AND AVGC50>C)
and can easily be converted into a single formula indicating direction as well (what I'd most likely use):
SGN(C-AVGC50)-SGN(C1-AVGC50.1)
Different people prefer different ways of doing things. For example, formulas returning values are usually more versatile than Boolean formulas. Even so, I prefer using Boolean formulas when looking for True/False results to creating a formula that returns a value and fiddling with the Rangefinder in an EasyScan (especially if I'm not going to sort by the result anyway). Do what works best for you under the circumstances.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |