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 |

Narrowest range in x days Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Putt4Dough
Posted : Friday, March 20, 2015 1:16:39 PM

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

 

garypayne
Posted : Friday, March 20, 2015 2:40:52 PM
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

Bruce_L
Posted : Monday, March 23, 2015 12:19:24 PM


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
Putt4Dough
Posted : Monday, March 23, 2015 12:23:23 PM

Registered User
Joined: 7/30/2007
Posts: 1,072

Thanks, Bruce! Thanks, Gary!

Bruce_L
Posted : Monday, March 23, 2015 12:37:00 PM


Worden Trainer

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

You're welcome.



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