Gold Customer
Joined: 9/29/2012 Posts: 13
|
Hi. There is a drawing tool to draw on a chart a regression line for some period of length. I am wondering if there is a way to create a PCF that returns TRUE if the slope of a regression line between today and 30 days ago is positive and FALSE if the slope of a regression line between today and 30 days ago is 0 or negative. Thank you.
|
Gold Customer
Joined: 9/29/2012 Posts: 13
|
Think I answered my own question...
Does TC2000 have a builtin function? That's alot of work to create that. God forbid if I want to do an entire year or 2. :)
(
(
30 *
(
30 * c +
29 * c1 +
28 * c2 +
27 * c3 +
26 * c4 +
25 * c5 +
24 * c6 +
23 * c7 +
22 * c8 +
21 * c9 +
20 * c10 +
19 * c11 +
18 * c12 +
17 * c13 +
16 * c14 +
15 * c15 +
14 * c16 +
13 * c17 +
12 * c18 +
11 * c19 +
10 * c20 +
9 * c21 +
8 * c22 +
7 * c23 +
6 * c24 +
5 * c25 +
4 * c26 +
3 * c27 +
2 * c28 +
1 * c29
)
-
( (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 ) ) )
)
/
67425
)
> 0
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Linear Regressions and their slopes are not built into the Personal Criteria Formula Language.
PCF Formula Descriptions
That said, it is possible to create a formula which is quite a bit shorter than the one you have proposed which will produce the same results.
Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis
29 * (C - C29) + 27 * (C1 - C28) + 25 * (C2 - C27) + 23 * (C3 - C26) + 21 * (C4 - C25) + 19 * (C5 - C24) + 17 * (C6 - C23) + 15 * (C7 - C22) + 13 * (C8 - C21) + 11 * (C9 - C20) + 9 * (C10 - C19) + 7 * (C11 - C18) + 5 * (C12 - C17) + 3 * (C13 - C16) + C14 > C15
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Gold Customer
Joined: 9/29/2012 Posts: 13
|
Thank you for the references, Bruce.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|