Registered User Joined: 7/13/2005 Posts: 6

Is there a set of PCF's that can help identify triangle patterns, including ascending, symmetric, and descending ones.
Thanks


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

Once you define the time period you want to see the triangle in, yes.
Here are two PCFs to create:
High's slope 20 day AVGH10/AVGH10.10*100
Low's slope 20 day AVGL10/AVGL10.10*100
(or)
High's slope 40 day AVGH20/AVGH20.20*100
Low's slope 40 day AVGL20/AVGL20.20*100
(you can change the numbers to cover any time period)
For each of these the values mean this:
Around 100 the slope of the highs/lows are flat Above 100 the slope is up Below 100 the slope is down
With these you can now create three EasyScans and limit the slope of the highs and lows to fit the triangle pattern.
Here are videos on PCFs and EasyScans if you are new to either feature.
How to create a Personal Criteria Forumula (PCF)
Using EasyScan to find stocks that meet your own criteria
 Craig Here to Help!


Registered User Joined: 10/7/2004 Posts: 43

Please explain what you mean by the next paragraph
Around 100 the slope of the highs/lows are flat Above 100 the slope is up Below 100 the slope is down
Thanks


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

These value ranges will make sense to you once you create the PCF's and start putting them into the EasyScans.
Each PCF will have a range selector in EasyScan. The VALUE range you set for them will determine if the highs or lows are, on average, ascending, descending or moving sideways. For example, here is how I would set them to help find ascending triangles:
High's slope 20day (I want the highs to be close to flat  moving sideways) VALUE 90  110
Low's slope 20day (I want the lows to be increasing or sloping up) VALUE 100 to MAX
Watch the two videos I linked above. Create the PCFs and EasyScans after that. It might help to sort some WatchLists by these conditions so you can see the relationship between their values and the charts.
 Craig Here to Help!


Registered User Joined: 5/19/2005 Posts: 100

This seems to work reasonable well, but has a lot of invalid results because it is looking for results that exactly match the top and bottom lines...is there a way to do this using 2 linear regression lines (to draw the top and bottom of the triangle) as it seems to me that that would be more accurate.
Thanks, Eric


Worden Trainer
Joined: 10/1/2004 Posts: 4,308

The standard plotted linear regression lines in TeleChart are based on the closing price of the latest downloaded price bar. For triangles, you're looking at highs and lows.
Here is a linear regression formula for a 20 day period:
AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9  0.5 * C10  1.5 * C11  2.5 * C12  3.5 * C13  4.5 * C14  5.5 * C15  6.5 * C16  7.5 * C17  8.5 * C18  9.5 * C19) / 665
If you recreated this formula twice, first replacing each C with an H (for high), and a second time, replacing each C with an L for low, you could plot each resulting formula as a Custom Indicator on your chart. You would wind up with a linear regression line based on the highs, and another LR line based on the lows.
Then you could sort by the visual slope of the highs, flagging the stocks with the slope you want (based on what pattern you're looking for), and then go to the All Flagged Items watchlist and sort again by the visual slope of the lows, again to find the slope you want for your desired pattern.
 Doug Teaching Online!


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

LR lines cannot be drawn on just the highs or lows.
If you think the settings I offer are too tight... loosen them up!
Change 90110 to 75125 Change 100 to MAX to 85 to MAX.
Play around with it.
 Craig Here to Help!


Registered User Joined: 5/19/2005 Posts: 100

I guess I find the results a bit off becuase the formula is taking the avg of the highs for half the period back and comparing it to the avg of the highs for the other half of the period VS the same thing for the lows...but the avg of the highs can be going sideways and the avg of the lows can be going up, but the trend of the stock is doing something completly different...
how about this: for a 40 day ascending triangle...compare the high point 20 days ago with the high point 4020 days ago VS. the low point 20 days ago with the low point 4020 days ago...
is it possible to do something like that?
Thanks, Eric


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

Try this:
MAXH20/MAXH20.20
MINL20/MINL20.20
Is that what you mean?
Why not scan for the pattern (using what I originally suggest) THEN sort the results by Price Percent Change 1month or 26weeks to establish the trend of the stock.
OR
Add this to the scan:
AVGC35/AVGC35.35*100
Values above 100 mark a general 70day uptrend. Values below 100 mark a general 70day downtrend.
 Craig Here to Help!


Registered User Joined: 5/19/2005 Posts: 100

Yes that is what I was thinking about...thanks...


Registered User Joined: 10/27/2005 Posts: 71

So would I creat the following PCF's
High's slope 20 day AVGH10/AVGH10.10*100
and
Low's slope 20 day AVGL10/AVGL10.10*100
Name 1 the "highs slope" and the other the "lows slope" using the values of 90110 for H and 100MAX for L.(In the easy scan)
Is this correct ??
Can I also add linear regression to this, and if I do should I add it to the top via a custom signal ??
Thanks in Advance!


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

You create both PCFs. I would name them as I did (include the period value like 20day)
Once you create them both you can limit them based on what you are looking for. If you want to try and find an ascending triagle forming over the last 20 days I would limit as follows:
High's slope 20 day (VALUES: 90 to 110)
Low's slope 20 day (VALUES: 105 to MAX)
You can tighten or loosen these limits to increase or reduce the number of charts found.
 Craig Here to Help!


Registered User Joined: 10/27/2005 Posts: 71

Gotcha, can you tell me what exactly is 105  Max. ?
Thanks Craig.


Worden Trainer
Joined: 10/1/2004 Posts: 4,308

If 100 means a flat slope, then 105 would be a slight upslope...and the MAX would be the stock with the most steep upslope.
 Doug Teaching Online!


Registered User Joined: 10/27/2005 Posts: 71

How does this look ??
Thanks Craig


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

Looks great.
I would also add PRICE PERCENT CHANGE 26weeks and limit the VALUES to either just positive or just negative values. This will set the stocks it finds into up or down trends.
You should also add PRICE PER SHARE and VOLUME 90DAY and limit to fit your trading. This will get rid of any stocks out of your price range or ones that may not be liquid enough for you.
 Craig Here to Help!


Registered User Joined: 10/27/2005 Posts: 71

Excellent, thanks Craig.
Mark


Registered User Joined: 10/27/2005 Posts: 71

Lastlt Craig, what would be good setting for the descending Tri.?
Mark


Worden Trainer
Joined: 10/1/2004 Posts: 4,308

I think if you switch the values for High's Slope and Low's Slope, you'll find what you want.
High's Slope 20 Day 105 to MAX Low's Slope 20 Day 90 to 110
Try that.
 Doug Teaching Online!


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

For a descending triangle we want the highs to go down and the lows to maintain. Doug was close....
High's Slope 20 Day MIN to 95 Low's Slope 20 Day 90 to 110
 Craig Here to Help!


Registered User Joined: 10/27/2005 Posts: 71

Im not getting triangles. Should I show you my pfc's? Im sure there fine. Maybe you could direct me to a source for pcf syntax and I can fix it myself.
Thanks Guys
Mark


Registered User Joined: 10/27/2005 Posts: 71

Explain to my why for the high slope 20 day we use this;
AVGH10 / AVGH10.10 * 100
this is the avg high 10 days ago divied by the avg high 10.10 days ago * 100 .. right ?
How is that a flat slope, and how does the adjusting by rank and list values influence this code ??
Is the only source for studying syntax just reviewing existing code??
Thanks


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

The code compares the recent highs to the previous highs. You add this to and EasyScan and then use the RANGE selector to limit the values.
Watch this video to learn how to use the range selector:
Using EasyScan to find stocks that meet your own criteria
Here is a post on PCF syntax:
Handy PCF example formulas to help you learn the syntax of PCFs!
If the highs are close to each other over the past 20 days, this PCF will return a value close to 100. You use the range selector to limit the findings to just those near 100 (or any values, depending on what you are looking for.)
The best way to understand the PCF is to sort a big WatchList (like the Russell 3000) by it. Look at the high values then look at the charts. Look at values near 100 then look at the charts, etc.
 Craig Here to Help!


Registered User Joined: 10/27/2005 Posts: 71

OK I got it, heres what works. I just did 2 custom indicators with H and L values ploted on price as dashed lines. Then I did two seperate linear regression lines and then sorted by SLOPE  all the 0.00 's are flat for the highs, I guess I can flag these and create a watch list. This seems to be the most accurate, any comments ??
Thanks


Registered User Joined: 10/27/2005 Posts: 71

EVEN BETTER is to do the same as above and then look for the bottom slope sorted by visual slope then you just scan and look for the flat top.. all the posatives are ascending slopes...works very well.
Mark


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

Glad to hear it. You can do the same thing by sorting by my PCFs and it may be quicker. Which ever works for you!
 Craig Here to Help!


Registered User Joined: 1/1/2005 Posts: 2,645

QUOTE (Craig_S) LR lines cannot be drawn on just the highs or lows.
Craig,
Please construct an invisible Custom Indicator with the PCF:
H
Please check "Plot using price scale". Now, place a LR Line on this Indicator. The result is an LR Line on just the highs.
Long day?
Thanks, Jim Murphy


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

No, not a long day.
My statement is true. You cannot draw a LR on just the highs and lows.
You solution is to draw an LR on a custom indictor of the highs.
The LR is on a custom indicator.
 Craig Here to Help!


Registered User Joined: 1/1/2005 Posts: 2,645

QUOTE (Craig_S) My statement is true. You cannot draw a LR on just the highs and lows.
Craig,
Maybe you cannot draw an LR Line on just the highs and the lows, but we can certainly can draw an LR Line for just the highs or just the lows. I think maybe what you are saying is that you cannot apply the built in LR Line to an indicator without producing the indicator (maybe invisible) first. Right?
Anyway, I believe it more instructive to tell users how to plot a curve they may want than just telling them essentially how they cannot do it. Maybe not. Many would certainly disagree with me in a classroom environment at least.
Thanks, Jim Murphy


Registered User Joined: 1/1/2005 Posts: 2,645

QUOTE (Doug_H) The standard plotted linear regression lines in TeleChart are based on the closing price of the latest downloaded price bar. For triangles, you're looking at highs and lows.
Here is a linear regression formula for a 20 day period:
AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9  0.5 * C10  1.5 * C11  2.5 * C12  3.5 * C13  4.5 * C14  5.5 * C15  6.5 * C16  7.5 * C17  8.5 * C18  9.5 * C19) / 665
If you recreated this formula twice, first replacing each C with an H (for high), and a second time, replacing each C with an L for low, you could plot each resulting formula as a Custom Indicator on your chart. You would wind up with a linear regression line based on the highs, and another LR line based on the lows.
Then you could sort by the visual slope of the highs, flagging the stocks with the slope you want (based on what pattern you're looking for), and then go to the All Flagged Items watchlist and sort again by the visual slope of the lows, again to find the slope you want for your desired pattern.
Doug,
If I cannot follow your instructions, I doubt less experienced users can. Will you please help us?
Suppose that instead of using the PCF you gave we just constructed two Custom Indicators one with the PCF H and one with the PCF L. Then, we placed a Moving Linear Regression of period 20 on each. The resulting plots are exactly the same as we obtain by following your instructions. Right?
Suppose we follow your instruction exactly up to the last paragraph. The last paragraph starts, "Then you could sort by the visual slope of the highs...". Exactly what are we suppose to do at that point since if we have followed your instructions there is no such option?
Suppose we plotted an LR Line of period 20 for the highs and did a sort by visual slope on the LR Line. Is that what you intended by "Then you could sort by the visual slope of the highs ..."? Then, of course, we could do the same thing for a plot of an LR Line for the lows. Was this your intent?
If so, I do not know the reason for ever having constructed the two Custom Indicators you described. Were they just a mistake and you intended the construction of the LR Lines I described?
If you are too close to it to see the problems, maybe Craig or Bruce or both can help us by answering the questions or even more. Then, again, maybe I am the only one who does not understand. Is it true that the only indicator that one can apply "sort by visual slope" to is an LR Line?
Thanks, Jim Murphy


Registered User Joined: 1/1/2005 Posts: 2,645

Mark,
Please recall that it is trend lines on the highs and lows that make triangles, not LR lines. This suggests that you may investigate the application of LR lines to something like MAXH5 and MINL5 rather than just H and L. Since triangles are usually visible on line charts also, you could also consider LR lines on something like MAXC5 and MINC5.
I have not tried these approaches myself. They may be worthless.
Thanks, Jim Murphy


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

bustermu, Can I do a Visual Slope of a Custom Indicator? No. But this is a discussion forum where participants throw out ideas that may not be fully formed and I found Doug's post to be a very useful springboard. The following formulas are a direct result of his Wednesday, September 07, 2005 2:36:26 PM and your Friday, March 03, 2006 5:11:16 AM posts:
20Period LR of Close as % of 60Period Range:
1900 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + .5 * C9  .5 * C10  1.5 * C11  2.5 * C12  3.5 * C13  4.5 * C14  5.5 * C15  6.5 * C16  7.5 * C17  8.5 * C18  9.5 * C19) / 665 / (MAXH60  MINL60)
20Period LR of High as % of 60Period Range:
1900 * (9.5 * H + 8.5 * H1 + 7.5 * H2 + 6.5 * H3 + 5.5 * H4 + 4.5 * H5 + 3.5 * H6 + 2.5 * H7 + 1.5 * H8 + .5 * H9  .5 * H10  1.5 * H11  2.5 * H12  3.5 * H13  4.5 * H14  5.5 * H15  6.5 * H16  7.5 * H17  8.5 * H18  9.5 * H19) / 665 / (MAXH60  MINL60)
20Period LR of Low as % of 60Period Range:
1900 * (9.5 * L + 8.5 * L1 + 7.5 * L2 + 6.5 * L3 + 5.5 * L4 + 4.5 * L5 + 3.5 * L6 + 2.5 * L7 + 1.5 * L8 + .5 * L9  .5 * L10  1.5 * L11  2.5 * L12  3.5 * L13  4.5 * L14  5.5 * L15  6.5 * L16  7.5 * L17  8.5 * L18  9.5 * L19) / 665 / (MAXH60  MINL60)
20Period LR of 5Period Maximum Close as % of 60Period Range:
1900 * (9.5 * MAXC5 + 8.5 * MAXC5.1 + 7.5 * MAXC5.2 + 6.5 * MAXC5.3 + 5.5 * MAXC5.4 + 4.5 * MAXC5.5 + 3.5 * MAXC5.6 + 2.5 * MAXC5.7 + 1.5 * MAXC5.8 + .5 * MAXC5.9  .5 * MAXC5.10  1.5 * MAXC5.11  2.5 * MAXC5.12  3.5 * MAXC5.13  4.5 * MAXC5.14  5.5 * MAXC5.15  6.5 * MAXC5.16  7.5 * MAXC5.17  8.5 * MAXC5.18  9.5 * MAXC5.19) / 665 / (MAXH60  MINL60)
20Period LR of 5Period Maximum High as % of 60Period Range:
1900 * (9.5 * MAXH5 + 8.5 * MAXH5.1 + 7.5 * MAXH5.2 + 6.5 * MAXH5.3 + 5.5 * MAXH5.4 + 4.5 * MAXH5.5 + 3.5 * MAXH5.6 + 2.5 * MAXH5.7 + 1.5 * MAXH5.8 + .5 * MAXH5.9  .5 * MAXH5.10  1.5 * MAXH5.11  2.5 * MAXH5.12  3.5 * MAXH5.13  4.5 * MAXH5.14  5.5 * MAXH5.15  6.5 * MAXH5.16  7.5 * MAXH5.17  8.5 * MAXH5.18  9.5 * MAXH5.19) / 665 / (MAXH60  MINL60)
20Period LR of 5Period Minimum Close as % of 60Period Range:
1900 * (9.5 * MINC5 + 8.5 * MINC5.1 + 7.5 * MINC5.2 + 6.5 * MINC5.3 + 5.5 * MINC5.4 + 4.5 * MINC5.5 + 3.5 * MINC5.6 + 2.5 * MINC5.7 + 1.5 * MINC5.8 + .5 * MINC5.9  .5 * MINC5.10  1.5 * MINC5.11  2.5 * MINC5.12  3.5 * MINC5.13  4.5 * MINC5.14  5.5 * MINC5.15  6.5 * MINC5.16  7.5 * MINC5.17  8.5 * MINC5.18  9.5 * MINC5.19) / 665 / (MAXH60  MINL60)
20Period LR of 5Period Minimum Low as % of 60Period Range:
1900 * (9.5 * MINL5 + 8.5 * MINL5.1 + 7.5 * MINL5.2 + 6.5 * MINL5.3 + 5.5 * MINL5.4 + 4.5 * MINL5.5 + 3.5 * MINL5.6 + 2.5 * MINL5.7 + 1.5 * MINL5.8 + .5 * MINL5.9  .5 * MINL5.10  1.5 * MINL5.11  2.5 * MINL5.12  3.5 * MINL5.13  4.5 * MINL5.14  5.5 * MINL5.15  6.5 * MINL5.16  7.5 * MINL5.17  8.5 * MINL5.18  9.5 * MINL5.19) / 665 / (MAXH60  MINL60)
Bruce Personal Criteria Formulas TC2000 Support Articles


Registered User Joined: 1/1/2005 Posts: 2,645

Bruce,
I believe that:
20Period LR of Close as % of 60Period Range:
1900 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + .5 * C9  .5 * C10  1.5 * C11  2.5 * C12  3.5 * C13  4.5 * C14  5.5 * C15  6.5 * C16  7.5 * C17  8.5 * C18  9.5 * C19) / 665 / (MAXH60  MINL60)
should read:
20Period LR Slope of Close as % of 60Period Range:
100 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + .5 * C9  .5 * C10  1.5 * C11  2.5 * C12  3.5 * C13  4.5 * C14  5.5 * C15  6.5 * C16  7.5 * C17  8.5 * C18  9.5 * C19) / 665 / (MAXH60  MINL60)
I put "Slope" in the title and replaced the 1900 by 100. All seven of your PCFs should undergo the same corrections. Right?
You and I and, I suppose, everyone else have the same problem with Doug's post. Thanks for your help. It seems to me that the post should be corrected, or, at least, a statement that it is in error should be made.
Mark,
I suggest you not use Bruce's PCFs to sort at first. Instead, place LR Lines on, for example, MAXH5, MINL5, MAXC5, and MINC5 and see how it does. If you get good results, then sort by something like Bruce's PCFs.
Thanks, Jim Murphy


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

bustermu, I wasn't trying to write a slope formula. I intended the formulas I presented to calculate the entire vertical range of the current 20Period Linear Regression Line expressed as a percentage of the entire 60Period Range for Price (and percentages are normally calculated by comparing values using the same units of measure). Adjusting the formula descriptions to modify LR with Line, Range or some combination might make this more clear, but the titles are already pretty long.
Bruce Personal Criteria Formulas TC2000 Support Articles


Registered User Joined: 1/1/2005 Posts: 2,645

Bruce.
That explains the multiplication of the slope of the LR Line of Period 20 by the factor 19.
I believe:
"... the entire horizontal range of the current 20Period Linear Regression Line ..."
should read:
"... the entire vertical range of the current 20Period Linear Regression Line ..."
Thanks for the explanation, Jim Murphy


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

bustermu, You're right about that! Changed.
Bruce Personal Criteria Formulas TC2000 Support Articles


Registered User Joined: 10/27/2005 Posts: 71

WOW, this is getting good. I appreciate everybodys input. Thanks Jim.


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

Have you created these PCFs yet?
High's slope 20 day AVGH10/AVGH10.10*100
Low's slope 20 day AVGL10/AVGL10.10*100
The triangles are formed by the trends of the highs and lows over a period of time. You can adjust the VALUE range for these two PCFs in EasyScan to help locate different types of triangles.
Try drawing the traingle you want on a sheet of paper. Are the highs about the same with the lows increasing? Are the highs trending down while the lows stay the same? Are the highs falling while the lows are rising?
Once you decide which triangle you want, use this guide to limit your VALUE range in EasyScan for each of the PCFs.
For each of these the values mean this:
Around 100 the slope of the highs/lows are flat Above 100 the slope is up Below 100 the slope is down
These value ranges will make sense to you once you create the PCF's and start putting them into the EasyScans.
Each PCF will have a range selector in EasyScan. The VALUE range you set for them will determine if the highs or lows are, on average, ascending, descending or moving sideways. For example, here is how I would set them to help find ascending triangles:
High's slope 20day (I want the highs to be close to flat  moving sideways) VALUE 90  110
Low's slope 20day (I want the lows to be increasing or sloping up) VALUE 100 to MAX
 Craig Here to Help!


Registered User Joined: 2/22/2006 Posts: 29

i tried the pcf's and easy scans for ascending triangles, both the 20 day and 40 day. i guess, it is really a scroll and a visual thing to find the "best triangle". does the order mean anything, i.e. how would the stocks on the top of the list differ from the stocks on the bottom of the list? thanks. barbara


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

As with any pattern, your eyes are the best judge.
The EasyScan/Sort given above is only meant to limit the number of stocks you need to spacebar through. It is designed more to eliminate stocks that cannot be triangles more than to find triangles. Your eye and brain are the best pattern recognition software out there.
 Craig Here to Help!


Guest1 