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 flags, 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: 64,305

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
Frenchy99
Posted : Tuesday, October 23, 2018 4:42:28 PM
Registered User
Joined: 10/16/2017
Posts: 7

It's now 2018

Do you have a formula for Bullish and Bearish Flag paterns?

For Daily and intraday scans?

Bruce_L
Posted : Tuesday, October 23, 2018 4:57:33 PM


Worden Trainer

Joined: 10/7/2004
Posts: 64,305

Do I just have a single formula which is going to match your particular concept of a flag pattern? No, but you may wish to review the following for information on pattern recognition in TC2000 (concentrating on topics mentioning wedge, penants, triangle, and flags):

Falling wedge
Cup with a handle formation
PCF for cup with a handle
Scanning for Chart Patterns
Scanning for Stocks Printing a Double or Triple Bottom
PCFs for pennants and flags
PCF's for Triangles
Does TeleChart support Elliott Wave indicators?
Double top/bottom trend
Finding Double Tops and Double Bottoms
CUP AND HANDLE AGAIN
Finding Continuation Triangles And Wedges With Telechart
Cup & Handle PCF
Double tops and bottoms
Flag wedge and pennant pcf
05/01/2012 Webinar: Trading the Flag and Pennant Patterns

That said, I personally do not think complex pattern recognition is practical in TC2000 using formulas and Scans.

They are at the very least beyond my abilities to help you create without a specific unambiguous objective definition of what you are attempting to identify. It can't be an I know it when I see it type of definition or be based entirely on an image.

This is true of pattern recognition in general with the exception of fixed size candlestick patterns, which are fairly straightforward as long as the pattern is well defined:

Boolean PCFs for Candlestick Patterns



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