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 |

pattern scan pcf Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Laufman
Posted : Sunday, March 22, 2009 3:03:50 PM
Registered User
Joined: 3/20/2005
Posts: 46
i'm trying to code the following scan to no avail:

a wide range bar (+2%) followed by a narrow range bar (-1%) irrespective of the direction (bullish or bearish) of either (i.e., a wide green bar followed by a narrow green OR red bar and vice versa). i thought this might be done using ABS values (preferred), but may require two separate scans depending on direction.

thanks.

jl
Bruce_L
Posted : Monday, March 23, 2009 12:45:24 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Assuming the comparison to determine if the Bar is wide or narrow is just made to the previous Bar, a Wide Range Bar that is at least 2% larger followed by a narrow Range Bar that is at least 1% narrower could be written as:

H - L <= .99 * (H1 - L1) AND H1 - L1 >= 1.02 * (H2 - L2)

That said, your mention of the absolute value function makes me wonder if you mean a Wide Range Body and Narrow Range Body instead:

ABS(C - O) <= .99 * ABS(C1 - O1) AND ABS(C1 - O1) >= 1.02 * ABS(C2 - O2)

It is also possible of course that you mean something else entirely. You may wish to review the following:

How to create a Personal Criteria Forumula (PCF)
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

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