TC2000.com• Download software • Tutorial videos • Subscription & data-feed pricing • Class schedule
TC2000Brokerage.com• New account application • Trading resources • Margin rates • Stock & option commissions
Worden Discussion Forum
Customer Training & Support
Ask a Trainer - TC2000 version 12/18
TC 2000 Bull flags, Bear Flags
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
Example of what I have so far.
((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))
((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!
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.
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
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!
It's now 2018
Do you have a formula for Bullish and Bearish Flag paterns?
For Daily and intraday scans?
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):
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