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 |

FINDING STOCKS IN A RISING CHANNEL? Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mcwang2012
Posted : Saturday, August 23, 2014 12:08:15 AM
Registered User
Joined: 2/17/2013
Posts: 67

Dear Sir,

IS THERE A PCF WHICH CAN HELP FIND STOCKS IN A RISING CHANNEL FOR A PERIOD OF THE LAST 120 DAYS BASED ON PRICE?

BR,

MCWANG

Bruce_L
Posted : Monday, August 25, 2014 1:17:37 PM


Worden Trainer

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

We could check for the 120-period linear regression slope and net change over the period to be positive.

(59.5 * C + 58.5 * C1 + 57.5 * C2 + 56.5 * C3 + 55.5 * C4 + 54.5 * C5 + 53.5 * C6 + 52.5 * C7 + 51.5 * C8 + 50.5 * C9 + 49.5 * C10 + 48.5 * C11 + 47.5 * C12 + 46.5 * C13 + 45.5 * C14 + 44.5 * C15 + 43.5 * C16 + 42.5 * C17 + 41.5 * C18 + 40.5 * C19 + 39.5 * C20 + 38.5 * C21 + 37.5 * C22 + 36.5 * C23 + 35.5 * C24 + 34.5 * C25 + 33.5 * C26 + 32.5 * C27 + 31.5 * C28 + 30.5 * C29 + 29.5 * C30 + 28.5 * C31 + 27.5 * C32 + 26.5 * C33 + 25.5 * C34 + 24.5 * C35 + 23.5 * C36 + 22.5 * C37 + 21.5 * C38 + 20.5 * C39 + 19.5 * C40 + 18.5 * C41 + 17.5 * C42 + 16.5 * C43 + 15.5 * C44 + 14.5 * C45 + 13.5 * C46 + 12.5 * C47 + 11.5 * C48 + 10.5 * C49 + 9.5 * C50 + 8.5 * C51 + 7.5 * C52 + 6.5 * C53 + 5.5 * C54 + 4.5 * C55 + 3.5 * C56 + 2.5 * C57 + 1.5 * C58 + 0.5 * C59 - 0.5 * C60 - 1.5 * C61 - 2.5 * C62 - 3.5 * C63 - 4.5 * C64 - 5.5 * C65 - 6.5 * C66 - 7.5 * C67 - 8.5 * C68 - 9.5 * C69 - 10.5 * C70 - 11.5 * C71 - 12.5 * C72 - 13.5 * C73 - 14.5 * C74 - 15.5 * C75 - 16.5 * C76 - 17.5 * C77 - 18.5 * C78 - 19.5 * C79 - 20.5 * C80 - 21.5 * C81 - 22.5 * C82 - 23.5 * C83 - 24.5 * C84 - 25.5 * C85 - 26.5 * C86 - 27.5 * C87 - 28.5 * C88 - 29.5 * C89 - 30.5 * C90 - 31.5 * C91 - 32.5 * C92 - 33.5 * C93 - 34.5 * C94 - 35.5 * C95 - 36.5 * C96 - 37.5 * C97 - 38.5 * C98 - 39.5 * C99 - 40.5 * C100 - 41.5 * C101 - 42.5 * C102 - 43.5 * C103 - 44.5 * C104 - 45.5 * C105 - 46.5 * C106 - 47.5 * C107 - 48.5 * C108 - 49.5 * C109 - 50.5 * C110 - 51.5 * C111 - 52.5 * C112 - 53.5 * C113 - 54.5 * C114 - 55.5 * C115 - 56.5 * C116 - 57.5 * C117 - 58.5 * C118 - 59.5 * C119) / 143990 > 0 AND C > C119

But this wouldn't necessarily mean the prices were "in a channel", just that they were generally rising over the period.

I really can't think of a good way to check for price actually being in a channel over 120 bars. Most of the things I can think of would be way too long and slow to be practical or post in the forums.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bcochrane
Posted : Tuesday, August 26, 2014 8:58:05 AM
Registered User
Joined: 9/17/2010
Posts: 484

A couple of work arounds you might want to try are based on finding stocks which exhibit performance several times over the period of time you are interested in.

For example, you might want to play with the scan described here (http://forums.worden.com/default.aspx?g=posts&t=10997) and see if by playing with time frames etc you get close to what you want.

Another approach is find stocks where the Moving Averages are positioned relative to each other over the time period you want. For example:

For the last market close, all listed stocks with…

  • 20-day Simple Moving Average of Volume for today is greater than 100000

  • 60-day Simple Moving Average of Close for today is greater than 1

  • Daily Close for today is greater than Daily Close for yesterday

  • Daily Close for today is greater than 5-day Simple Moving Average of Close for today

  • 5-day Simple Moving Average of Close for today is greater than 20-day Simple Moving Average of Close for today

  • 20-day Simple Moving Average of Close for today is greater than 50-day Simple Moving Average of Close for today

  • 5-day Simple Moving Average of Close for 5 days ago is greater than 20-day Simple Moving Average of Close for 5 days ago

  • 20-day Simple Moving Average of Close for 5 days ago is greater than 50-day Simple Moving Average of Close for 5 days ago

  • 20-day Simple Moving Average of Close for 5 days ago is greater than 20-day Simple Moving Average of Close for 10 days ago

  • 50-day Simple Moving Average of Close for 5 days ago is greater than 50-day Simple Moving Average of Close for 10 days ago

  • 20-day Simple Moving Average of Close for 10 days ago is greater than 20-day Simple Moving Average of Close for 15 days ago

  • 50-day Simple Moving Average of Close for 10 days ago is greater than 50-day Simple Moving Average of Close for 15 days ago

  • 50-day Simple Moving Average of Close for 15 days ago is greater than 50-day Simple Moving Average of Close for 20 days ago

which is a scan I found on Seeking Alpha. I'm sorry that, while I have this as a Scan, I can't cut and paste for you. (at least, I don't think so).

You likely will find candidtes with both approaches, but have to play with the parameters to best match what you want.

Best of luck.

 

Bruce_L
Posted : Tuesday, August 26, 2014 9:06:07 AM


Worden Trainer

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

bcochrane,
Thank you for stepping up with so much good and useful information.

You should be able to go to Tools | Old Features | TCMail in TC2000 version 12.4 to send a TCMail to mcwang2012 if you want. Selecting Add next to Attachments: will allow you to attach Charts, EasyScans and Layouts to the TCMail.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bcochrane
Posted : Tuesday, August 26, 2014 11:22:34 AM
Registered User
Joined: 9/17/2010
Posts: 484

And I have done that, or least I hit Send.

Bruce, I'm thinking that some other technical indicator would help us find stocks which have "clung" closely to the mid point of a channel, because the plot of price is "smoother" rather than choppy.

I've played a bit with Kaufman Efficiency, CCI and Beta without coming to a sound conclusion. Before I spend too much more time on the topic, I wonder if it makes sense to you, and, based on your better understanding of how the indicators are calculated, which indicators might be most rewarding to test, and which I shouldn't pursue further. Not expecting you to do any testing, just an off the top of the head assessment.

Thanks

 

bcochrane
Posted : Tuesday, August 26, 2014 11:34:46 AM
Registered User
Joined: 9/17/2010
Posts: 484

Bruce, walked away from my computer, and had another thought:

If stock in rising channel for a given period, then

  • MA 10 > MA 20
  • MA 20 > MA 30, and during the channel up (or down) period
  • the MAs would never have crossed.

I've not used the Count # of occurences feature, could it be used here?

Bruce_L
Posted : Tuesday, August 26, 2014 11:55:43 AM


Worden Trainer

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

Keep in mind when reading through the following that the trainers can't actually offer setting, interpretation or investment advice. The statements that follow are generally going to be limited to a mathematical analysis as a result.

Things like Kaufman Efficiency, CCI, ADX and RSI could indicate consistent movement over time. Beta would not seem to fall into this category. I really don't know what would work best.

Ideally you would calculate a something like a "mean deviation from linear regression". This would be the average distance between price and the current linear regression line over the entire period of that linear regression line. There is no way I can think of to create a formula for this which is short enough to be practical for anything but the shortest linear regression periods however.

I tried a Custom PCF Indicator to check for the distance between price and the linear regression line with a high Period and the Average Type set to Simple, but it doesn't work like you would probably want because it is comparing the price to the linear regression time at the time and not the current linear regression line.

About the closest thing I can think of to a mean deviation from linear regression which can be constructed with relatively short formulas would be LR curve fit error (LRrms). Sorting by this value does not necessarily produce an order which seems to correspond to what visually looks like increasingly tight trends as the value gets lower however.

Need help writing a PCF for r-squared

Price will ride or hug the upper or lower Bollinger Band when it is consistently moving up or down if the width of the Bollinger Bands are set to SQR(3*(P-1)/(P+1)) standard deviations. I'm not sure if there is a way to utilize this to identify tightly trending stocks however.

Bollinger Bands and Linear Regression Bands
CCI Clone & Bollinger Bands

You could definitely use something like the following as the Boolean Formula in a Custom PCF % True Indicator and checking for it to have high values (maybe even only allow 100% by checking for the result to be > 99.99) when the Period is set to the number of bars over which you want to check and the Average Type is set to Simple.

AVGC10 > AVGC20 AND AVGC20 > AVGC30

Create Conditions from Your Chart (5:25)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bcochrane
Posted : Tuesday, August 26, 2014 5:20:31 PM
Registered User
Joined: 9/17/2010
Posts: 484

Another scan I have which will find Candidates for stocks in channels is :

c >avgC10 and AVGC10>AVGC20  AND AVGC20> AVGC50

where I scan for the same condition twice, once for daily and once for weekly. Its the same Condition, but with two different Time Frames.

Seems to return more candidates (at least today) than the one I first posted above.

bcochrane
Posted : Monday, December 1, 2014 6:20:24 PM
Registered User
Joined: 9/17/2010
Posts: 484

Sorry to bother you, Bruce, but I just can't give up on this one. :-)

Altria (MO) has been on fairly consistent uptrend since April 2014. When I plot Rate of Change % (50), it rarely, and only minimally, drops below zero. The simple moving average (10) of ROC% never did drop below zero.

Ever hopeful, I wonder if there is any way of having TC2000 somehow check for this condition.

Thanks

Bruce_L
Posted : Tuesday, December 2, 2014 10:23:18 AM


Worden Trainer

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

You can check for the 50-period rate of change % being above zero using the following Condition Formula.

C > C50

You can check for the 10-period simple moving average of the 50-period rate of change % being above zero using the following Condition Formula.

C / C50 + C1 / C51 + C2 / C52 + C3 / C53  + C4 / C54  + C5 / C55  + C6 / C56  + C7 / C57  + C8 / C58  + C9 / C59 > 10

You can use the Custom PCF % True Indicator technique described near the end of my Tuesday, August 26, 2014 11:55:43 AM ET post to check for the formulas being true over Period bars.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bcochrane
Posted : Tuesday, December 2, 2014 11:34:31 AM
Registered User
Joined: 9/17/2010
Posts: 484

Thanks Bruce, looks promising. Now I can play with the durations or periods to see if I can come up with something workable.

Bruce_L
Posted : Tuesday, December 2, 2014 11:35:56 AM


Worden Trainer

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

You're welcome.



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