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 |

Combine PCFs Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
briannosaurus.rex
Posted : Tuesday, April 1, 2014 11:00:35 AM
Registered User
Joined: 1/7/2014
Posts: 26

So I've been trying to make an indicator for the past couple days but cannot seem to get it right.  I want to combine a pullback PCF with my Close between 2 MAs PCF. Essentially I want it to scan for a close between 2 MAs that came right after (within 3 days) of a pullback.  Therefor scanning for trend reversals.

So for example let say I have my Close between the 10 SMA and 30 SMA as such:

C>AVGC10 AND C<AVGC30

But I only after a pullback (within 3 days), a simple pullback PCF that I was using is:

(C < C1 AND 2 * O > H + L AND 2 * C < H + L AND C1 < C2 AND 2 * O1 > H1 + L1 AND 2 * C1 < H1 + L1 AND C2 < C3 AND 2 * O2 > H2 + L2 AND 2 * C2 < H2 + L2) AND ((C3 > AVGC20.3 AND MAXH10.3 > MAXH20.13) OR (C3 < C4 AND 2 * O3 > H3 + L3 AND 2 * C3 < H3 + L3) AND ((C4 > AVGC20.4 AND MAXH10.4 > MAXH20.14) OR (C4 < C5 AND 2 * O4 > H4 + L4 AND C5 > AVGC20.5 AND MAXH10.5 > MAXH20.15)))

So, how do I modify the combine PCFs to find the Close between MAs first and then look for the Pullback 1-3 days before that occurrence?

Bruce_L
Posted : Thursday, April 10, 2014 10:57:20 AM


Worden Trainer

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

Your simple pullback scan seems pretty complicated to me. I've tried to manually make 1-bar ago:

(C1 < C2 AND 2 * O1 > H1 + L1 AND 2 * C1 < H1 + L1 AND C2 < C3 AND 2 * O2 > H2 + L2 AND 2 * C2 < H2 + L2 AND C3 < C4 AND 2 * O3 > H3 + L3 AND 2 * C3 < H3 + L3) AND ((C4 > AVGC20.4 AND MAXH10.4 > MAXH20.14) OR (C4 < C5 AND 2 * O4 > H4 + L4 AND 2 * C4 < H4 + L4) AND ((C5 > AVGC20.5 AND MAXH10.5 > MAXH20.15) OR (C5 < C6 AND 2 * O5 > H5 + L5 AND C6 > AVGC20.6 AND MAXH10.6 > MAXH20.16)))

2-bars ago:

(C2 < C3 AND 2 * O2 > H2 + L2 AND 2 * C2 < H2 + L2 AND C3 < C4 AND 2 * O3 > H3 + L3 AND 2 * C3 < H3 + L3 AND C4 < C5 AND 2 * O4 > H4 + L4 AND 2 * C4 < H4 + L4) AND ((C5 > AVGC20.5 AND MAXH10.5 > MAXH20.15) OR (C5 < C6 AND 2 * O5 > H5 + L5 AND 2 * C5 < H5 + L5) AND ((C6 > AVGC20.6 AND MAXH10.6 > MAXH20.16) OR (C6 < C7 AND 2 * O6 > H6 + L6 AND C7 > AVGC20.7 AND MAXH10.7 > MAXH20.17)))

And 3-bars ago:

(C3 < C4 AND 2 * O3 > H3 + H3 AND 2 * C3 < H3 + L3 AND C4 < C5 AND 2 * O4 > H4 + L4 AND 2 * C4 < H4 + L4 AND C5 < C6 AND 2 * O5 > H5 + L5 AND 2 * C5 < H5 + L5) AND ((C6 > AVGC20.6 AND MAXH10.6 > MAXH20.16) OR (C6 < C7 AND 2 * O6 > H6 + L6 AND 2 * C6 < H6 + L6) AND ((C7 > AVGC20.6 AND MAXH10.7 > MAXH20.17) OR (C7 < C8 AND 2 * O7 > H7 + L7 AND C8 > AVGC20.8 AND MAXH10.8 > MAXH20.18))

Versions, but you may want to look them over to see if I incremented them incorrectly or introduced any errors.

To check for the close being between moving averages now with the pullback happening either now or on one of the previous three bars would result in a structure of:

AVGC10 < C AND C < AVGC30 AND ((0-bars ago pullback) OR (1-bar ago pullback) OR (2-bars ago pullback) OR (3-bars ago pullback))

Substiting the formulas results in the following Condition Formula.

AVGC10 < C AND C < AVGC30 AND (((C < C1 AND 2 * O > H + L AND 2 * C < H + L AND C1 < C2 AND 2 * O1 > H1 + L1 AND 2 * C1 < H1 + L1 AND C2 < C3 AND 2 * O2 > H2 + L2 AND 2 * C2 < H2 + L2) AND ((C3 > AVGC20.3 AND MAXH10.3 > MAXH20.13) OR (C3 < C4 AND 2 * O3 > H3 + L3 AND 2 * C3 < H3 + L3) AND ((C4 > AVGC20.4 AND MAXH10.4 > MAXH20.14) OR (C4 < C5 AND 2 * O4 > H4 + L4 AND C5 > AVGC20.5 AND MAXH10.5 > MAXH20.15)))) OR ((C1 < C2 AND 2 * O1 > H1 + L1 AND 2 * C1 < H1 + L1 AND C2 < C3 AND 2 * O2 > H2 + L2 AND 2 * C2 < H2 + L2 AND C3 < C4 AND 2 * O3 > H3 + L3 AND 2 * C3 < H3 + L3) AND ((C4 > AVGC20.4 AND MAXH10.4 > MAXH20.14) OR (C4 < C5 AND 2 * O4 > H4 + L4 AND 2 * C4 < H4 + L4) AND ((C5 > AVGC20.5 AND MAXH10.5 > MAXH20.15) OR (C5 < C6 AND 2 * O5 > H5 + L5 AND C6 > AVGC20.6 AND MAXH10.6 > MAXH20.16)))) OR ((C2 < C3 AND 2 * O2 > H2 + L2 AND 2 * C2 < H2 + L2 AND C3 < C4 AND 2 * O3 > H3 + L3 AND 2 * C3 < H3 + L3 AND C4 < C5 AND 2 * O4 > H4 + L4 AND 2 * C4 < H4 + L4) AND ((C5 > AVGC20.5 AND MAXH10.5 > MAXH20.15) OR (C5 < C6 AND 2 * O5 > H5 + L5 AND 2 * C5 < H5 + L5) AND ((C6 > AVGC20.6 AND MAXH10.6 > MAXH20.16) OR (C6 < C7 AND 2 * O6 > H6 + L6 AND C7 > AVGC20.7 AND MAXH10.7 > MAXH20.17)))) OR ((C3 < C4 AND 2 * O3 > H3 + H3 AND 2 * C3 < H3 + L3 AND C4 < C5 AND 2 * O4 > H4 + L4 AND 2 * C4 < H4 + L4 AND C5 < C6 AND 2 * O5 > H5 + L5 AND 2 * C5 < H5 + L5) AND ((C6 > AVGC20.6 AND MAXH10.6 > MAXH20.16) OR (C6 < C7 AND 2 * O6 > H6 + L6 AND 2 * C6 < H6 + L6) AND ((C7 > AVGC20.6 AND MAXH10.7 > MAXH20.17) OR (C7 < C8 AND 2 * O7 > H7 + L7 AND C8 > AVGC20.8 AND MAXH10.8 > MAXH20.18)))))



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