New version 18 available now


Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

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

TC 2000 Bull falgs, Bear Flags Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
aviveros16
Posted : Tuesday, July 24, 2012 8:33:27 PM
Registered User
Joined: 8/25/2011
Posts: 6

I am building a scanner to scan for 4 bar inside pattern, (Bull Flag or Bear Flag)

Meaning One upbar or down bar, than Inside bars, inside the up move or down move candle

The inside bars must be 50 or less percent of the up move or down move

Also the setup, to be above moving avg for Bull flag setup and below for Bear Flag setup
 

http://postimage.org/image/d3agvvir7/

http://postimage.org/image/crtxlv07v/

http://postimage.org/image/q463q788x/

Example of what I have so far.

Bull Flag

((AvgC20 > AvgC50) AND ((H1<H4) AND (L1>L4) AND (H2<H4) AND (L2>L4) AND (H3<H4) AND (L3>L4)) AND (AvgL3>(.50*(H4-L4))+L4))

Bear Flag

((AvgC20 < AvgC50) AND ((H1<H4) AND (L1>L4) AND (H2<H4) AND (L2>L4) AND (H3<H4) AND (L3>L4)) AND (AvgH3<(.50*(H4-L4))+L4))

 

I wanted to know if I have it written correctly, I am new. I have got a few good signals but get too many signals sometimes that don't look what I am looking for

 

Any help will be appriciate it!

 

 

 

 

Bruce_L
Posted : Wednesday, July 25, 2012 8:02:49 AM


Worden Trainer

Joined: 10/7/2004
Posts: 63,727

For the most part I don't see any problems with it. There are unneccessary parentheses, but that shouldn't make it not work correctly.

I do have some possible suggestions based on the definitions you provided.

You don't seem to actually check for the up bar or down bar at the beginning of the pattern. We could define that as the close being above the open or the close being above the previous close. The following formulas use both definitions.

You have said the bars need to be "50 or less percent of the up move or down move." You are checking for the average high or low to be in the desired 50% of the range of the entire candle.

You may want to instead check for the highest high or lowest low to be within this range instead and that is what is done below.

Bull Flag

AVGC20 > AVGC50 AND H1 < H4 AND L1 > L4 AND H2 < H4 AND L2 > L4 AND H3 < H4 AND L3 > L4 AND MINL3 > (H4 + L4) / 2 AND C4 > O4 AND C4 > C5

Bear Flag

AVGC20 < AVGC50 AND H1 < H4 AND L1 > L4 AND H2 < H4 AND L2 > L4 AND H3 < H4 AND L3 > L4 AND MAXH3 < (H4 + L4) / 2 AND C4 < O4 AND C4 < C5

This may or may not be what you want. Other possibilities would be to check for the range of these bars to be less than 50% of the total range of the first bar, the net change of the first bar from previous close to close or the change from the open to close of the first bar.

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.