Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 2/20/2011 Posts: 4
|
Using TC 2000 version 12, is it possible (and how) to sort a stock watch list by the SLOPE of the linear regression (LR) line indicator?
I have tried to sort a stock watch list by the LR indicator, but the sorting results are not by LR slope, but by the latest values of the LR indicator.
By the way, through the Worden discussion forum at http://forums.worden.com/default.aspx?g=posts&t=3268, I saw this is possible for the TeleChart Platinum.
Thanks very much in advance
Jason
|
|
Registered User Joined: 10/15/2005 Posts: 9
|
The following code is written to determine the slope of a 30 period LR line. Insert this as an indicator, then you can scan and sort using it. I did not write this, so I can't answer any questions such as how to modify it for a different length.
(30 * (C29 + 2 * C28 + 3 * C27 + 4 * C26 + 5 * C25 + 6 * C24 + 7 * C23 + 8 * C22 + 9 * C21 + 10 * C20 + 11 * C19 + 12 * C18 + 13 * C17 + 14 * C16 + 15 * C15 + 16 * C14 + 17 * C13 + 18 * C12 + 19 * C11 + 20 * C10 + 21 * C9 + 22 * C8 + 23 * C7 + 24 * C6 + 25 * C5 + 26 * C4 + 27 * C3 + 28 * C2 + 29 * C1 + 30 * C) - 465 * (C + C1 + C2 + C3 + C4 + C5 + C6 + C7 + C8 + C9 + C10 + C11 + C12 + C13 + C14 + C15 + C16 + C17 + C18 + C19 + C20 + C21 + C22 + C23 + C24 + C25 + C26 + C27 + C28 + C29)) / (30 * 9455 - 465 * 465)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis topic explores how to create formulas for the Linear Regression Line and its Slope.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 2/20/2011 Posts: 4
|
Thank you very much. I'll read the reference post.
Jason
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |