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 Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.