Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

50 sma Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
msrio
Posted : Friday, September 9, 2005 3:41:07 PM
Registered User
Joined: 1/30/2005
Posts: 7
I want to find stock prices when they cross the 50 sma
Thanks
Donna
Bruce_L
Posted : Friday, September 9, 2005 3:45:58 PM


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
Winnie
Posted : Saturday, September 10, 2005 12:20:17 PM
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
Winnie
Posted : Saturday, September 10, 2005 12:23:02 PM
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
Craig_S
Posted : Saturday, September 10, 2005 1:07:37 PM


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!
Bruce_L
Posted : Monday, September 12, 2005 8:15:25 AM


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