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

highest high in last 30 days Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
hakkinenxxxx
Posted : Friday, October 11, 2013 9:19:24 AM
Registered User
Joined: 3/25/2012
Posts: 28

Hi, how can I formulate if yesterday's high or the day before yesterday's high was the highest in last 30 days?

Bruce_L
Posted : Friday, October 11, 2013 9:30:41 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

It depends on what you actually mean.

The highest high in the 30 bars ending with the current bar is:

MAXH30

And the highest high in the 30 bars ending with the previous bar is:

MAXH30.1

The high of 1 bar ago is:

H1

The high of 2 bars ago is:

H2

And the higher of 1 and 2 bars ago is:

MAXH2.1

So it ends up being a matter of combining these terms in the way that actually matches the intent of your question. If either yesterday's high or the day before yesterday's high needs to be at the highest point in the 30 days ending today:

MAXH2.1 = MAXH30

If the 30 days end yesterday:

MAXH2.1 = MAXH30.1

If one or both of those bars needs to be higher than all of the other bars:

MAXH2.1 > MAXH28.3

If each of those bars is being compared to its own set of 30-bars ending on that particular bar:

H1 > MAXH29.2 OR H2 > MAXH29.3

There are a lot of other possible interepretations as well.

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



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