Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
What's moving linear Regression?
Also I need to plot the LR Slope as an indicator in its own pane. I don't see the indicator in TC but we have it in SF
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A moving linear regression plots the right ends of the linear regerssion lines over time.
Linear Regression Slope is not one of the built in indicators in TC2000.
If you know the formula for the indicator to which you wish to plot the linear regression slope, you can use the following template.
6 * (FAVG(w, x) - AVG(w, x)) / (x - 1)
Where w is the formula and x is the period of the linear regression slope.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
On the LR Slope indicator you posted above plotted on the closing price which means replacing W's by C's and time frame set to 30
What does the value that the indicator plots mean. Of course I understand positive means the slope is up and negative means down but if its plotting 1.50 does that mean that the average gain is 1.50 per day during the last 30 days?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It means the linear regression line when up 1.5 during each bar.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
IF(((6 * (FAVG(C, 22) - AVG(C, 22)) / (22 - 1)) > 0), 1, 0)
Bruce in the above PCF I am trying to say of the LR Slope is > 0 plot 1 if not 0 but I get an error
Where am I going wrong
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I think the problem is using IF instead of IIF. You can write this as follows.
IIF(FAVGC22 > AVGC22, 1, 0)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 3/31/2006 Posts: 3,207
|
thx
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |