Registered User Joined: 10/28/2007 Posts: 3

Hi,
I have two formulas: TSV Tilt Today:.
((TSV27 + TSV27.15) / 2  AVG(TSV27,16)) * 12 / 182
and TSV Tilt Yesterday:
((TSV27.1 + TSV27.16) /2  AVG(TSV27.1,16)) * 12 / 182
I'm trying to customize these in order to use them to create a scan that will find stocks that have an upward sloping TSV linear regression line. Can you help?

Worden Trainer
Joined: 10/7/2004 Posts: 63,008

What is the Period of the Linear Regression Line?
Bruce Personal Criteria Formulas TC2000 Support Articles

Registered User Joined: 10/28/2007 Posts: 3

QUOTE (Bruce_L) What is the Period of the Linear Regression Line?
The period is something fairly short termmaybe 18 days or so.
Thanks,
Anna

Worden Trainer
Joined: 10/7/2004 Posts: 63,008

You could just calculate the Slope of the Linear Regression Line directly:
Slope of LR18 of Simple TSV27:
(8.5 * TSV27 + 7.5 * TSV27.1 + 6.5 * TSV27.2 + 5.5 * TSV27.3 + 4.5 * TSV27.4 + 3.5 * TSV27.5 + 2.5 * TSV27.6 + 1.5 * TSV27.7 + 0.5 * TSV27.8  0.5 * TSV27.9  1.5 * TSV27.10  2.5 * TSV27.11  3.5 * TSV27.12  4.5 * TSV27.13  5.5 * TSV27.14  6.5 * TSV27.15  7.5 * TSV27.16  8.5 * TSV27.17) / 484.5
Just add a > 0 or < 0 to the end. You may wish to review the following:
Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis
How to create a Personal Criteria Forumula (PCF)
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
Bruce Personal Criteria Formulas TC2000 Support Articles

Registered User Joined: 10/28/2007 Posts: 3

Thank you very much!
Anna

Gold Customer
Joined: 12/5/2005 Posts: 63

Hi Bruce, could you please help me to write a PCF for a downsloping LR21 of Simple TSV21 makes its first upward change of angle and the slope of LR21 of Simple TSV21 is still sloping down? Thanks

Worden Trainer
Joined: 10/7/2004 Posts: 63,008

TSV21 > TSV21.1 AND TSV21.1 < TSV21.2 AND 10 * (TSV21  TSV21.20) + 9 * (TSV21.1  TSV21.19) + 8 * (TSV21.2  TSV21.18) + 7 * (TSV21.3  TSV21.17) + 6 * (TSV21.4  TSV21.16) + 5 * (TSV21.5  TSV21.15) + 4 * (TSV21.6  TSV21.14) + 3 * (TSV21.7  TSV21.13) + 2 * (TSV21.8  TSV21.12) + TSV21.9 < TSV21.11
Bruce Personal Criteria Formulas TC2000 Support Articles

Gold Customer
Joined: 12/5/2005 Posts: 63

Thanks

Gold Customer
Joined: 12/5/2005 Posts: 63

Hi Bruce, I back test the PCF, which you wrote on 5/29 on stock symbol "TTD". Several signals shown on 3/27/2018, 4/2/2018, 4/5/2018, 4/9/2018 and 4/11/2018 are not what i want to have. How do i modify the PCF so that the signal occured on 4/12/2018, which is the first TILTUP signal of downsloping LR21 of Simple TSV21.

Worden Trainer
Joined: 10/7/2004 Posts: 63,008

So you aren't interested in simpe TSV21 making its first upward change of angle while the 21period linear regression slope of simple TSV21 is down?
You are just interested in the 21period moving linear regression changing from going down to going up?
The following would work in TC2000 v18.
TrueInRow(3 * FAVG(TSV21, 21)  2 * AVG(TSV21, 21) > 3 * FAVG(TSV21.1, 21)  2 * AVG(TSV21.1, 21), 2) = 1
Linear Regression Line & Moving Linear Regression
As would the following slightly shorter but more opaque fomula.
TrueInRow(41 * TSV21 + 19 * TSV21.21 > 60 * AVG(TSV21.1, 20), 2) = 1
Slope of moving linear regression line
But you would need to check the values of both the current and previous bars in TC2000 v7.
41 * TSV21 + 19 * TSV21.21 > 60 * AVG(TSV21.1, 20) AND 41 * TSV21.1 + 19 * TSV21.22 <= 60 * AVG(TSV21.2, 20)
Bruce Personal Criteria Formulas TC2000 Support Articles

Gold Customer
Joined: 12/5/2005 Posts: 63

Thanks, Bruce. Yes, I am interesting the LR21 changing from going down to going up.

Worden Trainer
Joined: 10/7/2004 Posts: 63,008

The three formulas in my Friday, June 01, 2018 3:40:12 PM ET post are all for the MLR21 of simple TSV21 going from down to going up.
Bruce Personal Criteria Formulas TC2000 Support Articles

Gold Customer
Joined: 12/5/2005 Posts: 63

Thanks, Bruce, all your formulas are working fine. I do not know how you can get those coefficients (41, 19, 60), but it works. Thank you for all your help.

Worden Trainer
Joined: 10/7/2004 Posts: 63,008

You're welcome.
Bruce Personal Criteria Formulas TC2000 Support Articles
