Registered User Joined: 10/12/2012 Posts: 5
|
I am having a hard time understanding these formulas. I am looking for a formula that will return results for any stocks that have moved UP 30% or more within the past 5 days including the current day. I think this would be simple to figure out but I can't figure it out. Thanks.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The start of the process would be to define what you actually mean by stocks that have moved up 30% or more within the past 5 days. Here are three possibilities, but there are a lot of other possible interpretations.
If you want the current price to be at least 30% more than the close of 5 bars ago:
C >= 1.3 * C5
If you want the current price to be at least 30% more than the lowest low during the most recent 5 bars:
C >= 1.3 * MINL5
If you want any of price to have been for sure 30% above any previous price during the 5 bar periood up until that time:
C >= 1.3 * MINL5 OR C1 >= 1.3 * MINL4.1 OR C2 >= 1.3 * MINL3.2 OR C3 >= 1.3 * MINL2.3 OR C4 >= 1.3 * L4 OR H >= 1.3 * MINL4.1 OR H1 >= 1.3 * MINL3.2 OR H2 >= 1.3 * MINL2.3 OR H3 >= 1.3 * L4 OR H >= 1.3 * O OR H1 >= 1.3 * O1 OR H2 >= 1.3 * O2 OR H3 >= 1.3 * O3 OR H4 >= 1.3 * O4 OR H5 >= 1.3 * O5
Note that this can still miss instances where price was up at least 30% at some point, but this is because there is no way to tell if the high or low of a particular bar came first.
The formula follows from the definition.
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: 10/12/2012 Posts: 5
|
This is great thank you.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|