Registered User Joined: 1/8/2005 Posts: 118
|
How would I write a percent true formula to find stocks consolidating in a 5% range for the last 5 days?
Thanks for your help.
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A formula that would return True when the Range of a symbol over 5-Bars was restricted to within 5% of the Low over that same Period would be:
MAXH5 / MINL5 <= 1.05
Visually Backtesting Specific Symbols
PCF Formula Descriptions
How to create a Personal Criteria Forumula (PCF)
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 1/8/2005 Posts: 118
|
Thank you - now what would I add to find stocks breaking out above that range?
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
That depends on your particular unambiguous objective definition of "breaking out above that range". Assuming it needs to have been within that 5% range for 5-Bars and that the breakout must exceed the 5% range, you'd need to shift the previous formula back 1-Bar and add a check for the High or Close of the current Bar being beyond that Range. For the High:
MAXH5.1 / MINL5.1 <= 1.05 AND H / MINL5.1 > 1.05
For the Close:
MAXH5.1 / MINL5.1 <= 1.05 AND C / MINL5.1 > 1.05
If you want the "breakout" to be more than 5%, you would need to adjust the 1.05 appropriately.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|