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

Scan and Alert for Price crosin above/below 2 moving averages Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
agbrina
Posted : Tuesday, September 18, 2012 10:48:10 AM
Registered User
Joined: 6/25/2008
Posts: 14

It has been so long since I last felt the need to write my own PCF for an easyscan that I have forgotten the syntax needed to write one.

I want to be able to scan for stocks within a specified watchlist, looking for those whose prices have crossed above (and, of course separately, below) its 10-bar moving average, AND whose 10-bar moving average is also above (below) its 20-bar moving average.

I then want to be able to set up an alert trigger for a few stocks within TC2000, on both intraday and daily time frames, using this scan.

I would appreciate it if you could write this for me. But also, I would like you to include a link to a prior post which would explain the syntax I need to use in order to make such simple scan formulas myself.

Thank you.

Bruce_L
Posted : Tuesday, September 18, 2012 10:52:57 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If you want price to just be above the moving average, the above version would be:

C > AVGC10 AND AVGC10 > AVGC20

And the below version would be:

C < AVGC10 AND AVGC10 < AVGC20

If you need to price to actually have crossed up through the moving average between the previous bar and the current bar, the crossing up version would be:

C > AVGC10 AND C1 <= AVGC10.1 AND AVGC10 > AVGC20

And the crossing down version would be:

C < AVGC10 AND C1 >= AVGC10.1 AND AVGC10 < AVGC20

Moving Average PCF Templates
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
agbrina
Posted : Tuesday, September 18, 2012 3:21:17 PM
Registered User
Joined: 6/25/2008
Posts: 14

Thank you, Bruce. Those links are now inmy Worden Favorites Folder. Arthur

Bruce_L
Posted : Tuesday, September 18, 2012 3:22:35 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



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