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 |

PCF Please Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
daledalmada
Posted : Friday, December 15, 2017 11:20:24 AM
Registered User
Joined: 7/5/2009
Posts: 191

Would you please help me with a PCF for the following:

Assuming the year is 252 trading days long:

price made a new 52 week intraday low yesterday OR  price made a new 52 week intraday low today

 

Thank you!

Bruce_L
Posted : Friday, December 15, 2017 11:34:06 AM


Worden Trainer

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

If we just look at the most recent 252 bars.

MINL2 < MINL250.2

If we look at the most recent 252 bars at the time of the bar.

L < MINL251.1 OR L1 < MINL251.2



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
daledalmada
Posted : Friday, December 15, 2017 12:26:01 PM
Registered User
Joined: 7/5/2009
Posts: 191

Thank you Bruce.  How are these two different in their meaning?

MINL1 < MINL250.2

MINL2 < MINL250.2

Using symbol UA as an example, if I use the first one I get a custom % true indicator on 11/6/17.  But if I use the second one I get an indicator on 11/7/17.  I don't understand 11/7/17 indicator since 11/6/17 had a lower intraday 52 week low?

Bruce_L
Posted : Friday, December 15, 2017 12:31:49 PM


Worden Trainer

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

MINL1 < MINL250.2 is the same as L < MINL250.2 and isn't checking L1 at all.

The second one returns true for 11/7/17 since it is checking for either today or yesterday to have made a new 52 week intraday low (in this case, yesterday - 11/6/17 made the low).

"price made a new 52 week intraday low yesterday OR price made a new 52 week intraday low today "



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
daledalmada
Posted : Friday, December 15, 2017 12:44:45 PM
Registered User
Joined: 7/5/2009
Posts: 191

Thank you Bruce.  Is there a way to tweak these two pcfs so that they do not pick up 11/7/17 with with my custom % true indicator?

MINL2 < MINL250.2

L < MINL251.1 OR L1 < MINL251.2
Bruce_L
Posted : Friday, December 15, 2017 12:47:52 PM


Worden Trainer

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

You can just not check for yesterday. That is what is causing it to appear.

L < MINL251.1

But I don't understand the yesterday reference at all if this is what you actually want.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
daledalmada
Posted : Friday, December 15, 2017 1:28:10 PM
Registered User
Joined: 7/5/2009
Posts: 191

Thank you Bruce.  Now I see what I was missing.  The first two PCFs you provided are what I was looking for.  Although I still don't quite undersatnd the difference between the two.  

If we just look at the most recent 252 bars.

MINL2 < MINL250.2

If we look at the most recent 252 bars at the time of the bar.

L < MINL251.1 OR L1 < MINL251.2

 
Bruce_L
Posted : Friday, December 15, 2017 1:37:47 PM


Worden Trainer

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

Based on our assumptions, the current year is MINL252 and runs from bar 0 to bar 251.

MINL2 < MINL250.2

Compares the two most recent bars to the previous 250 bars. So both parts added together cover the 252 bar span running from bar 0 to bar 251.

So this formulas says, OK looking at the most recent year ending today, is the lower of the two most recent bars, lower than the rest of the year?

Now let's looking at the second formulas parts separately.

L < MINL251.1 covers the 252 bar span running from bar 0 to bar 251.

So this says, looking at the most recent year ending today, is the most recent bar lower than the rest of the year?

L1 < MINL252.2 covers the 252 bar span running from bar 1 to bar 252.

And this says, looking at the year ending yesterday, is the yesterday lower than the rest of the year?

When combined into L < MINL251.1 OR L1 < MINL251.2 we are asking if either of those two questions is true. So each portions covers a span of 252 bars, but the entire formula covers a span of 253 bars.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
daledalmada
Posted : Friday, December 15, 2017 1:52:04 PM
Registered User
Joined: 7/5/2009
Posts: 191

Now it makes sense.  Thank you so much for the thorough explanation Bruce.  I very much appreciate it!

Happy Holidays to you and thanks again for all of your help!

Bruce_L
Posted : Friday, December 15, 2017 1:52:31 PM


Worden Trainer

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

You're welcome. Happy Holidays!



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