Registered User Joined: 7/30/2007 Posts: 1,072
|
Bruce,
When I used to use StockFinder I seem to recall having the Linear Regression Slope indicator in a separate pane from Price.
In TC2000, can I put Linear Regression Slope in its own separate pane, or am I stuck having it in the same pane as Price?
I'm not having any luck this morning, but maybe I just need another cup of coffee.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
TC2000 does not have a built in Linear Regression Slope indicator. You would have to create the Linear Regression Slope as a Custom PCF Indicator.
Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis
Unless you specifically plot the Custom PCF Indicator in the same pane as Price History, it will plot in its own pane.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Bruce,
This may just be semantics, but when I said "Linear Regression Slope" I think I meant what is described in the TC2000v12 help file as "Moving Linear Regression" ... unless I completely got them mixed up and they are two totally separate indicators.
I'm able to add Moving Linear Regression to Price History ("Moving Ln Reg") in TC2000 but I'm not able to place it in its own pane (unless I add Price History and plot Price History's color the same as the chart background color to make it "disappear".
Is "Linear Regression Slope" and "Moving Linear Regression" the same thing? Or two different indicators? What I'm trying to do in TC2000 is pretty much what Julia demonstrated back in her "Old Dog, New Trick" webinar (back in the StockFinder days).
For now, I'll read the post you linked to, and try to figure out "Linear Regression Slope" versus "Moving Linear Regression".
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
A moving linear regression plots the endpoint of the linear regression. The moving linear regression value is the value that the endpoint of linear regression line using the same period would have hit on that bar.
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
I still need to read the post Bruce linked to (since that post I've been dusting off the StockFinder Help Files to try and figure out the difference between Moving Linear Regression and Linear Regression Slope).
I also took a few minutes to go back and review Julia's Old Dog New Trick webinar and she definitely used the Linear Regression Slope and a Moving Average of the Linear Regression Slope.
So, before I burn too many more brain cells :) ... it sounds like, in TC2000, I need to use a Custom PCF Indicator to create a Linear Regression Slope indicator. I'd like to start by using the same setting Julia did (20-periods). She also used a 10-period Moving average of the 20-period Linear Regression Slope. Is this all do-able in TC2000?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
An Indicator Formula for a 20-Period Linear Regression Slope could be written as:
(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
If you use the formula in a Custom PCF Indicator, you can add a Moving Average to it as a child indicator.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Thanks, Bruce. I'll give it a shot.
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Bruce, one more thing...
I'm still poking around the discussion fourm archives, but I was wondering if it's do-able to calculate a 20-Period "R-Squared" to complement the 20-Period Linear Regression Slope calculation you provided above.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following Indicator Formula for a 20-Period R-Squared:
(((20 - 1) / 2 * AVGC20 - (C1 + 2 * C2 + 3 * C3 + 4 * C4 + 5 * C5 + 6 * C6 + 7 * C7 + 8 * C8 + 9 * C9 + 10 * C10 + 11 * C11 + 12 * C12 + 13 * C13 + 14 * C14 + 15 * C15 + 16 * C16 + 17 * C17 + 18 * C18 + 19 * C19) / 20) / SQR((20 ^ 2 - 1) / 12 * ((C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2) / 20 - AVGC20 ^ 2))) ^ 2
Need help writing a PCF for r-squared
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Awesome, Bruce.
I'm off tomorrow, so I can try this real-time intraday :)
Thanks again.
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Bruce, thanks for the formula for a 20-Period Linear Regression Slope.
Can you throw a formula together for a 14-period indicator?
Also, if you have a minute to explain the construction of the formula, I can take a shot at writing my own so I don't have to bug you as I play with different period settings.
Thanks!
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Almost forgot...
Can you also do a 14-period R-Squared?
... and possibly explain the construction of that formula, so I can take a shot at writing those on my own as well?
Thanks again!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
An Indicator Formula for a 14-Period Linear Regression Slope could be written as:
(6.5 * C + 5.5 * C1 + 4.5 * C2 + 3.5 * C3 + 2.5 * C4 + 1.5 * C5 + .5 * C6 - .5 * C7 - 1.5 * C8 - 2.5 * C9 - 3.5 * C10 - 4.5 * C11 - 5.5 * C12 - 6.5 * C13) / 227.5
An Indicator Formula for a 14-Period R-Squared could be written as:
(((14 - 1) / 2 * AVGC14 - (C1 + 2 * C2 + 3 * C3 + 4 * C4 + 5 * C5 + 6 * C6 + 7 * C7 + 8 * C8 + 9 * C9 + 10 * C10 + 11 * C11 + 12 * C12 + 13 * C13) / 14) / SQR((14 ^ 2 - 1) / 12 * ((C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2) / 14 - AVGC14 ^ 2))) ^ 2
Please review the Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis and Need help writing a PCF for r-squared topics for information on how the formulas were created.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Awesome, Bruce. Thanks for the links. Have a great weekend!
|
|
Registered User Joined: 7/7/2013 Posts: 10
|
Hi Bruce, How do I write R-Squared (5-period) 1 day ago? This is current period : ((((5 - 1) / 2) * AVGC5 - (C1 +2*C2 +3*C3 +4*C4) / 5) / SQR(((5^2 - 1) / 12) * ((C^2 +C1^2 +C2^2 +C3^2 +C4^2) / 5 - AVGC5^2)))^2 Many thanks!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Just add 5 to all of the bars ago parameters in the formula:
((((5 - 1) / 2) * AVGC5.5 - (C6 + 2 * C7 + 3 * C8 + 4 * C9) / 5) / SQR(((5 ^ 2 - 1) / 12) * ((C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2) / 5 - AVGC5.5 ^ 2))) ^ 2
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/7/2013 Posts: 10
|
Thanks Bruce
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |