Registered User Joined: 2/15/2012 Posts: 25
|
This might be a 2 part pcf, not sure. I am trying to accomplish the following. I'd like to be able to look for weekly or monthly bars on a chart that will show me the range from low to high is narrower than a significant number of prior weekly or monthly bars....probabaly at least 6. So the smallest or close to the smallest range in some time....if i knew this could be written, i could add to it to lenghthen the timeframe or shorten.
The 2nd part, is that the volume for that week or month, should be significantly less or the lowest its been during that time. So maybe its less than the majority....
Its is possible to express a formula to search for these 2 criteria.
Sorry if this is confusing. Appreciate any input.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you actually want the range and volume to be less than all of the previous 6 bars, it could be written as follows.
H - L < LEAST(H1 - L1, 6) AND V < MINV6.1
Being less than the average is also fairly short.
H - L < AVG(H1 - L1, 6) AND V < AVGV6.1
But being less than say at least 4 of the previous 4 bars is a bit more complicated.
ABS(H - L < H1 - L1) - (H - L < H2 - L2) - (H - L < H3 - L3) - (H - L < H4 - L4) - (H - L < H5 - L5) AND (H - L < H6 - L6) >= 4 AND ABS(V < V1) - (V < V2) - (V < V3) - (V < V4) - (V < V5) - (V < V6) >= 4
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 2/15/2012 Posts: 25
|
I appreciate the help, playing around with those!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|