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 |

Percent True Question Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
lsaloga
Posted : Thursday, April 1, 2010 1:26:17 PM
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.
Bruce_L
Posted : Thursday, April 1, 2010 1:30:15 PM


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
lsaloga
Posted : Thursday, April 1, 2010 1:40:39 PM
Registered User
Joined: 1/8/2005
Posts: 118
Thank you - now what would I add to find stocks breaking out above that range?
Bruce_L
Posted : Thursday, April 1, 2010 1:46:38 PM


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