Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 7/30/2007 Posts: 1,072
|
Hi Bruce,
What's the easiest way to code a PCF to identify the condition where the current bar has the narrowest range of the last x days?
For the sake of example, let's say 5 days. Once I get the hang of it, I can modify it for different numbers of days.
Thanks, Bruce ... have a great weekend!!
|
|
Registered User Joined: 6/24/2006 Posts: 122
|
Here you go. I recomend you use a reletive strength sort like stocks above their 200 day ema. Filter them from strongest to weekest. start at the top, and work your way down. I have been using this for years with great sucess. It will give you many hits, so focus on strength. Most of the time stocks do nothing. That is the reason for so many hits, but the strength sort filters that out. As for the trade take it any way it goes. The hound of bakersfield livves here. Todays winner was AMBA.
((H - L) < (H1 - L1)) AND ((H - L) < (H2 - L2)) AND ((H - L) < (H3 - L3)) AND ((H - L) < (H4 - L4)) AND ((H - L) < (H5 - L5)) AND ((H - L) < (H6 - L6)) AND C > 13 AND AVGV50 > 10000
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The method described by garypayne is probably the best. It is possible to calculate the minimum range over the previous x bars, but the formula would be slower and less efficient than just comparing the range of the current bar to the range of each of the x bars individually.
Min Max PCFs
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Thanks, Bruce! Thanks, Gary!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |