Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

PCF for small bars Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jrixey
Posted : Wednesday, October 29, 2014 12:27:02 PM
Registered User
Joined: 10/7/2004
Posts: 45

Hi! I have a pcf which looks for compression - in other words, "todays" bar's Open - Close value is 25% or less of the High - Low range of the previous bar.  I have the code written as: abs(O-C) <=(H1-L1)*.25.

i am getting bizzare reuts where the scan flags charts where todays bar is much lager than yesterday's.  The scan had ben working fine untl recently.  Ay idea what is going on or how I need to re-write tthe pcf to get the desired results?

Thanks vey much!

Bruce_L
Posted : Wednesday, October 29, 2014 12:54:07 PM


Worden Trainer

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

Your formula is comparing the body of the current bar to the entire range of the previous bar. This means the current bar can in fact be larger than the previous bar as long as the body is less than or equal to 25% of the total range of the previous bar.

If you want the body to be 25% or less than the size of the previous body:

ABS(O - C) <= .25 * ABS(O1 - C1)

If you want the entire candle to be 25% or less than the size of the previous candle.

H - L <= .25 * ABS(H1 - L1)

Note that if you want a non-zero body, you would need to check for that because the formulas allow for equality.

O <> C

If you can have a zero body but not a zero total range, you could use the following instead.

H > L

If you are still not getting the desired results, can you provide some specific examples so we can take a look?

PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jrixey
Posted : Wednesday, October 29, 2014 2:21:48 PM
Registered User
Joined: 10/7/2004
Posts: 45

Bruce - your firmua is working great.  Thanks verymuch for your help!

 

Bruce_L
Posted : Wednesday, October 29, 2014 2:37:11 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.