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

Scan for Stochastic Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
dclee123
Posted : Wednesday, April 16, 2008 10:21:49 AM
Registered User
Joined: 10/19/2007
Posts: 4
I'm trying to figure out how I would create a pfc/scan to show stocks that:

1)  Have a positive MACD
2)  The sk period on stochastics intersects with the SD

I want to know when they both hit on the same day (yesterday or two days ago), and then when they intersec and the macd d has been positive..

I'm new to tc so I don't see if this can be done.

Thanks
Bruce_L
Posted : Wednesday, April 16, 2008 10:38:35 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Welcome to the forums. A very good foundation for learning how to use TeleChart can be gained by reviewing the following:

If you are new to TeleChart READ THIS FIRST!

The formulas would depend on your specific MACD and Stochastics settings:

MACD Settings:
- Short: ?
- Long: ?
- Period: ?
- Average Type: Simple or Exponential?
- Plot MACD as Histogram: Checked or Unchecked?

Stochastics Settings:
- Period: ?
- SK Period: ?
- SD Period: ?
- Average Type: Simple or Exponential?

You may wish to review the following:

Understanding MACD
Understanding Stochastics

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dclee123
Posted : Wednesday, April 16, 2008 11:26:24 AM
Registered User
Joined: 10/19/2007
Posts: 4
I'm just trying to figure out how to setup a pfc/scan, I can add any number once I figure out a formula to do this.  So, regarding your question:

MACD Settings:
- Short: 6
- Long: 28
- Period: 11
- Average Type: Simple
- Plot MACD as Histogram: Checked

Stochastics Settings:

- Period: 40
- SK Period: 5
- SD Period: 10
- Average Type: Simple

Thanks
Bruce_L
Posted : Wednesday, April 16, 2008 11:53:40 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The topics referenced at the end of my Wednesday, April 16, 2008 10:38:35 AM ET post contain general formulas for both MACD and Stochastics. The formulas for your MACD Histogram being positive would be:

Today:

AVGC6 - AVGC28 - AVG(AVGC6,11) + AVG(AVGC28,11) > 0

Yesterday:

AVGC6.1 - AVGC28.1 - AVG(AVGC6.1,11) + AVG(AVGC28.1,11) > 0

2-Days Ago:

AVGC6.2 - AVGC28.2 - AVG(AVGC6.2,11) + AVG(AVGC28.2,11) > 0

Formula for MACD crossing up (instead of just being above) would be about twice as long:

Between Yesterday and Today:

AVGC6 - AVGC28 - AVG(AVGC6,11) + AVG(AVGC28,11) > 0 AND AVGC6.1 - AVGC28.1 - AVG(AVGC6.1,11) + AVG(AVGC28.1,11) <= 0

Between 2-Days Ago and Yesterday:

AVGC6.1 - AVGC28.1 - AVG(AVGC6.1,11) + AVG(AVGC28.1,11) > 0 AND AVGC6.2 - AVGC28.2 - AVG(AVGC6.2,11) + AVG(AVGC28.2,11) <= 0

Between 3-Days Ago and 2-Days Ago

AVGC6.2 - AVGC28.2 - AVG(AVGC6.2,11) + AVG(AVGC28.2,11) > 0 AND AVGC6.3 - AVGC28.3 - AVG(AVGC6.3,11) + AVG(AVGC28.3,11) <= 0

The formulas for the SK xUp SD are:

Between Yesterday and Today:

STOC40.5 > AVG(STOC40.5,10) AND STOC40.5.1 <= AVG(STOC40.5.1,10)

Between 2-Days Ago and Yesterday:

STOC40.5.1 > AVG(STOC40.5.1,10) AND STOC40.5.2 <= AVG(STOC40.5.2,10)

Between 3-Days Ago and 2-Days Ago:

STOC40.5.2 > AVG(STOC40.5.2,10) AND STOC40.5.3 <= AVG(STOC40.5.3,10)

The formulas for the SK xDn SD are:

Between Yesterday and Today:

STOC40.5 < AVG(STOC40.5,10) AND STOC40.5.1 >= AVG(STOC40.5.1,10)

Between 2-Days Ago and Yesterday:

STOC40.5.1 < AVG(STOC40.5.1,10) AND STOC40.5.2 >= AVG(STOC40.5.2,10)

Between 3-Days Ago and 2-Days Ago:

STOC40.5.2 < AVG(STOC40.5.2,10) AND STOC40.5.3 >= AVG(STOC40.5.3,10)

The formulas for the SK crossing SD (in either direction) are:

Between Yesterday and Today:

SGN(STOC40.5 - AVG(STOC40.5,10)) <> SGN(STOC40.5.1 - AVG(STOC40.5.1,10))

Between 2-Days Ago and Yesterday:

SGN(STOC40.5.1 - AVG(STOC40.5.1,10)) <> SGN(STOC40.5.2 - AVG(STOC40.5.2,10))

Between 3-Days Ago and 2-Days Ago:

SGN(STOC40.5.2 - AVG(STOC40.5.2,10)) <> SGN(STOC40.5.3 - AVG(STOC40.5.3,10))

QUOTE (dclee123)
I'm trying to figure out how I would create a pfc/scan to show stocks that:

1)  Have a positive MACD
2)  The sk period on stochastics intersects with the SD

Taken literally, this would just seem to be:

AVGC6 - AVGC28 - AVG(AVGC6,11) + AVG(AVGC28,11) > 0 AND SGN(STOC40.5 - AVG(STOC40.5,10)) <> SGN(STOC40.5.1 - AVG(STOC40.5.1,10))

QUOTE (dclee123)
I want to know when they both hit on the same day (yesterday or two days ago)...

If you want the above for yesterday or two days ago instead today, you may wish to try the following:

(AVGC6.1 - AVGC28.1 - AVG(AVGC6.1,11) + AVG(AVGC28.1,11) > 0 AND SGN(STOC40.5.1 - AVG(STOC40.5.1,10)) <> SGN(STOC40.5.2 - AVG(STOC40.5.2,10))) OR (AVGC6.2 - AVGC28.2 - AVG(AVGC6.2,11) + AVG(AVGC28.2,11) > 0 AND SGN(STOC40.5.2 - AVG(STOC40.5.2,10)) <> SGN(STOC40.5.3 - AVG(STOC40.5.3,10)))

QUOTE (dclee123)
...and then when they intersec and the macd d has been positive.

This would lead me to the conclusion that you may have been seeking MACD xUp zero instead of just being above zero. This would change the above two formulas to (these are the crossover formulas, while the above are not):

AVGC6 - AVGC28 - AVG(AVGC6,11) + AVG(AVGC28,11) > 0 AND AVGC6.1 - AVGC28.1 - AVG(AVGC6.1,11) + AVG(AVGC28.1,11) <= 0 AND SGN(STOC40.5 - AVG(STOC40.5,10)) <> SGN(STOC40.5.1 - AVG(STOC40.5.1,10))

And:

(AVGC6.1 - AVGC28.1 - AVG(AVGC6.1,11) + AVG(AVGC28.1,11) > 0 AND AVGC6.2 - AVGC28.2 - AVG(AVGC6.2,11) + AVG(AVGC28.2,11) <= 0 AND SGN(STOC40.5.1 - AVG(STOC40.5.1,10)) <> SGN(STOC40.5.2 - AVG(STOC40.5.2,10))) OR (AVGC6.2 - AVGC28.2 - AVG(AVGC6.2,11) + AVG(AVGC28.2,11) > 0 AND AVGC6.3 - AVGC28.3 - AVG(AVGC6.3,11) + AVG(AVGC28.3,11) <= 0 AND SGN(STOC40.5.2 - AVG(STOC40.5.2,10)) <> SGN(STOC40.5.3 - AVG(STOC40.5.3,10)))

There are many other possible interpretations of your requests. If the formulas provided do not do what you want and you can provide detailed and objective feedback as to why, we will do our best to help your create formulas that do. You may wish to review the following:

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