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

Need help fine tuning this PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
kpnkool
Posted : Tuesday, September 25, 2007 12:40:22 PM
Registered User
Joined: 10/7/2004
Posts: 30
Is there anyway that this PCF can be written as a custom indicator for sorting, that would give either a True or False reading that the Indicator is either going up or down ** PERCISELY TODAY ** while using a 3 period smoothing average, Simple, Center Zero Line "NOT" checked.
Thank you for your help.
EWD

( - 1) * (((STOC12.12 - AVG(STOC12.12,4)) / 1.2) + ((STOC12.12 - AVG(STOC12.12,6)) / 1.2) + ((C - AVGC5) / C * 200) + ((STOC12.3 - AVG(STOC12.3,3)) / 3) + ((RSI8.3 - AVG(RSI8.3,3)) / 3) + ((((AVGC2 - AVGC14) - (AVGC5 - AVGC14)) / C) * 100) + ((((STOC2.1 + STOC2.2 + STOC3.1 + STOC3.2 + STOC4.1 + STOC4.2 + STOC5.1 + STOC5.2 + STOC6.1 + STOC6.2 + STOC7.1 + STOC7.2 + STOC8.1 + STOC8.2 ) / 14) - 50) * 2 / 10) + (((AVG(MS,2) - AVG(MS,8)) / C) / 3) > 0)
Bruce_L
Posted : Tuesday, September 25, 2007 12:52:23 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Please try the following:

SGN(((STOC12.12 - AVG(STOC12.12,4)) / 1.2) + ((STOC12.12 - AVG(STOC12.12,6)) / 1.2) + ((C - AVGC5) / C * 200) + ((STOC12.3 - AVG(STOC12.3,3)) / 3) + ((RSI8.3 - AVG(RSI8.3,3)) / 3) + ((((AVGC2 - AVGC14) - (AVGC5 - AVGC14)) / C) * 100) + ((((STOC2.1 + STOC2.2 + STOC3.1 + STOC3.2 + STOC4.1 + STOC4.2 + STOC5.1 + STOC5.2 + STOC6.1 + STOC6.2 + STOC7.1 + STOC7.2 + STOC8.1 + STOC8.2 ) / 14) - 50) * 2 / 10) + (((AVG(MS,2) - AVG(MS,8)) / C) / 3) > 0) <> SGN(((STOC12.12.3 - AVG(STOC12.12.3,4)) / 1.2) + ((STOC12.12.3 - AVG(STOC12.12.3,6)) / 1.2) + ((C3 - AVGC5.3) / C3 * 200) + ((STOC12.3.3 - AVG(STOC12.3.3,3)) / 3) + ((RSI8.3.3 - AVG(RSI8.3.3,3)) / 3) + ((((AVGC2.3 - AVGC14.3) - (AVGC5.3 - AVGC14.3)) / C3) * 100) + ((((STOC2.1.3 + STOC2.2.3 + STOC3.1.3 + STOC3.2.3 + STOC4.1.3 + STOC4.2.3 + STOC5.1.3 + STOC5.2.3 + STOC6.1.3 + STOC6.2.3 + STOC7.1.3 + STOC7.2.3 + STOC8.1.3 + STOC8.2.3 ) / 14) - 50) * 2 / 10) + (((AVG(MS1.3,2) - AVG(MS1.3,8)) / C3) / 3) > 0)

The Personal Criteria Formula should return True if the Custom Indicator went up or down and return False if the Custom Indicator remained the same. You may wish to review the following:

How to create a Personal Criteria Forumula (PCF)
Handy PCF example formulas to help you learn the syntax of PCFs!
PCF Formula Descriptions

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
kpnkool
Posted : Tuesday, September 25, 2007 12:59:40 PM
Registered User
Joined: 10/7/2004
Posts: 30
Thank you Bruce,
That seems to work just fine.

EWD
Bruce_L
Posted : Tuesday, September 25, 2007 1:01:33 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Tuesday, September 25, 2007 8:25:31 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Bruce,

Your response is correct as usual.

My question is why did you not comment on the addition of quantities of different dimensions? All of the terms of the original PCF are dimensionless except the term involving MS.

It is kind of like if a user asked:

"How do I plot closing price minus volume?"

and the answer was plot

C-V

as a Custom Indicator without additional comment.

I, of course, know that you know all of this, but, as a trainer, you may not feel that you should comment.

I do not know why users should be deprived of your exceptional abilities simply because you are a trainer.

Thanks,
Jim Murphy
Bruce_L
Posted : Wednesday, September 26, 2007 8:21:32 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
I can't seem to find it in the forums, but I remember both simplifying the syntax of this formula (called the "Master Indicator" or "One Big Indicator") and commenting on its mixed scales when I saw it for the first time. I saw little point in going through either exercise again when the formula in question was identical.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Thursday, September 27, 2007 9:12:09 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
EWD,

Since the AVGC14 cancels out, the left side of your PCF can be written:

(STOC12.12-AVG(STOC12.12,4))/1.2 + (STOC12.12-AVG(STOC12.12,6))/1.2
+ (C-AVGC5)/C*200 + (STOC12.3-AVG(STOC12.3,3))/3
+ (RSI8.3-AVG(RSI8.3,3))/3 + (AVGC2-AVGC5)/C)*100
+ ((STOC2.1+STOC2.2+STOC3.1+STOC3.2+STOC4.1+STOC4.2+STOC5.1+STOC5.2
+STOC6.1+STOC6.2+STOC7.1+STOC7.2+STOC8.1+STOC8.2)/14-50)*2/10
+ ((AVG(MS,2)-AVG(MS,8))/C)/3

This PCF defies the adage "do not add apples and oranges" since the first seven terms are dimensionless and the eighth:

((AVG(MS,2)-AVG(MS,8))/C)/3

is not. Suppose we plot the above with and without the eighth term as Custom Indicators with "Center Zero Line" checked. If we view the All Stocks WatchList, we observe that the two plots essentially overlay each other except for a few extremely high volume items like SPY. That would not be the case if volume in TeleChart were measured in shares rather than hundreds of shares.

I do not know of any reason why MS should only be of interest in the case of a few extremely high volume stocks. The term involving MS should be either deleted or modified so that it is dimensionless.

The MS term actually does little harm as is as long as we stay away from extremely high volume stocks. The PCF supplied by Bruce with and without the MS term were compared on the last 500 days of the Russell 1000 stocks. The two PCFs disagreed on only 0.09% of the trials.

Thanks,
Jim Murphy
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.