Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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
|
|
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
|
|
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.
|
|
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
|
|
Guest-1 |