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

PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
essoteric
Posted : Saturday, September 3, 2011 5:54:09 PM
Registered User
Joined: 12/22/2004
Posts: 10
I'd like to write a PCF for the following: 1) The chart is a 4 day chart. 2) Price > 50SMA. 3) 50SMA is angling up. i.e it's greater than the 50SMA of say 10 days ago. 3) Stochastics setting 3,1,3. %K is above 80 but has angled down. 4) MACD setting is 5,20,30. The short MA (5) is angled up.

Your help will be greatly appreacited.

Tariq Osman  
Bruce_L
Posted : Tuesday, September 6, 2011 11:33:30 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
In TC2000 version 12, the preferred method of doing this would be to add all of the indicators to the chart, click on the them and then select Create Condition. If you break all of the items down into their individual components, I do not see anything that couldn't be created this way. You would then add all of the resulting Conditions to a Scan. The result should calculate quicker while using less resources than creating a Condition Formula.

Indicators, Sorting & Scanning

That said, it is possible to create this a single Condition Formula in TC2000 version 12. You would want to set the Time Frame of the Condition Formula to 4-Day when creating or editing the Condition Formula. The following formula assumes that the average types for all indicators are simple and that you actually mean the raw MACD:

C > AVGC50 AND AVGC50 > AVGC50.10 AND STOC3 > 80 AND STOC3 < STOC3.1.1 AND AVGC5 - AVGC20 > AVGC5.10 - AVGC20.10

Understanding MACD
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
essoteric
Posted : Saturday, September 24, 2011 7:09:40 PM
Registered User
Joined: 12/22/2004
Posts: 10
I entered this in my PCF's and got a syntax error message. Also, I asked for the wrong criterea. I wanted stochastics 5 to be below 80 the day before and then to have turned up. 
Bruce_L
Posted : Monday, September 26, 2011 8:46:57 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The formula does not have any syntax errors. I just re-tested it and got Calculation Speed = Medium.

C > AVGC50 AND AVGC50 > AVGC50.10 AND STOC5.1.1 < 80 AND STOC5 > STOC5.1.1 AND STOC5.1.1 < STOC5.1.2 AND AVGC5 - AVGC20 > AVGC5.10 - AVGC20.10

The assumption is that "have turned up" requires moving down prior to the up bar. If you just need it to be moving up instead of turning up, you could eliminate this requirement by removing the following from the formula above:

AND STOC5.1.1 < STOC5.1.2

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