Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

MAX AND MIN FUNCTIONS Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
gadler
Posted : Thursday, December 3, 2009 9:32:04 AM
Registered User
Joined: 10/7/2004
Posts: 28

I have created a PCF that I named FORMULA UP.  I have tried to get the MAX for this over a ten day period and have not had any success. From looking at examples in the users manual, it appears that the proper format would be MAX(FORMULA UP,10) but this doesn't work. How can I accomplish this?

Bruce_L
Posted : Thursday, December 3, 2009 9:46:37 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The MAX() function will not work on formulas or other functions, it will only work on the Personal Criteria Formula Languages built in Indicators.

PCF Formula Descriptions

The Min Max PCFs topic outlines a technique for working around this limitation.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
gadler
Posted : Thursday, December 3, 2009 10:34:21 AM
Registered User
Joined: 10/7/2004
Posts: 28
Thank you Bruce. I looked at the links you provided and see that the PCFs you used were very basic and I understand the need to keep your answers short. You do get a lot of questions. Will these work arounds work with more complex PCFs?
Bruce_L
Posted : Thursday, December 3, 2009 10:40:18 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Other than the resulting formulas possibly ending up too long to be practical, there is no reason the technique can't be used with more complicated Personal Criteria Formulas. If you have a particular PCF in mind, I may be able to help you create it.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
gadler
Posted : Thursday, December 3, 2009 11:23:45 AM
Registered User
Joined: 10/7/2004
Posts: 28

Bruce, thank you for the offer. I will give you what I do but it may be too large. I have two indicators one I call Formula Up(FU) the other Fprmula Down(FD). I then take a moving average of each and then a couple of rate of changes of the moving average. What I have observed on my charts is that the ranges of the rates of change are a fairly reliable indicator of the direction. When the range of the FU rates of change exceeds those of the FD the trend is up, the trend is down when the opposite is true. I would like to be able to just chart these ranges rather than having to attempt to evaluate the upcoming direction by visual means. Here is the FU:

(((100 * (C - MINL12)) / (MAXH12 - MINL12)) * (AVGC12 / AVGC12.1) + ((100 * (C1 - MINL12.1)) / (MAXH12.1 - MINL12.1)) * (AVGC12.1 / AVGC12.2) + ((100 * (C2 - MINL12.2)) / (MAXH12.2 - MINL12.2)) * (AVGC12.2 / AVGC12.3) + ((100 * (C3 - MINL12.3)) / (MAXH12.3 - MINL12.3)) * (AVGC12.3 / AVGC12.4) + ((100 * (C4 - MINL12.4)) / (MAXH12.4 - MINL12.4)) * (AVGC12.4 / AVGC12.5) + ((100 * (C5 - MINL12.5)) / (MAXH12.5 - MINL12.5)) * (AVGC12.5 / AVGC12.6) + ((100 * (C6 - MINL12.6)) / (MAXH12.6 - MINL12.6)) * (AVGC12.6 / AVGC12.7)) / 7 + (((100 * (MAXH12-MINL12)) / (MAXH12-L)) / (AVGC12 / AVGC12.1) + ((100 * (MAXH12.1 - MINL12.1)) / (MAXH12.1 - L1)) / (AVGC12.1 / AVGC12.2) + ((100 * (MAXH12.2 - MINL12.2)) / (MAXH12.2 - L2)) / (AVGC12.2 / AVGC12.3) + ((100 * (MAXH12.3 - MINL12.3)) / (MAXH12.3 - L3)) / (AVGC12.3 / AVGC12.4) + ((100 * (MAXH12.4 - MINL12.4)) / (MAXH12.4 - L4)) / (AVGC12.4 / AVGC12.5) + ((100 * (MAXH12.5 - MINL12.5)) / (MAXH12.5 - L5)) / (AVGC12.5 / AVGC12.6) + ((100 * (MAXH12.6 - MINL12.6)) / (MAXH12.6 - L6)) / (AVGC12.6 / AVGC12.7)) / 7

I have the FU
  I then take a 4 day moving average of the FU
     I then take a 5 day rate of change of the mav
        I then take a 2 day rate of change of the 5 day rate of change

I suppose that similar results could probably come from a shorter FU but I haven't evaluated that yet.

Bruce_L
Posted : Thursday, December 3, 2009 5:02:54 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I haven't figured out a way to make the desired formula short enough to be practical.

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