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.
|
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
|
Registered User Joined: 6/25/2008 Posts: 14
|
Thank you, Bruce. Those links are now inmy Worden Favorites Folder. Arthur
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|