New version 18 available now


Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Scanning for upward tilting TSV linear regression bar Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
abutrim
Posted : Tuesday, November 20, 2007 1:39:45 PM
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?
Bruce_L
Posted : Tuesday, November 20, 2007 1:44:20 PM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442
What is the Period of the Linear Regression Line?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
abutrim
Posted : Tuesday, November 20, 2007 1:48:30 PM
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 term--maybe 18 days or so.

Thanks,

Anna

Bruce_L
Posted : Tuesday, November 20, 2007 2:00:49 PM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442
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
abutrim
Posted : Tuesday, November 20, 2007 2:13:41 PM
Registered User
Joined: 10/28/2007
Posts: 3
Thank you very much!

Anna
auchang929
Posted : Sunday, May 27, 2018 6:27:42 PM
Gold Customer 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

Bruce_L
Posted : Tuesday, May 29, 2018 10:09:22 AM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

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
auchang929
Posted : Wednesday, May 30, 2018 12:24:51 AM
Gold Customer Gold Customer

Joined: 12/5/2005
Posts: 63

Thanks

auchang929
Posted : Friday, June 01, 2018 3:27:06 PM
Gold Customer 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.

Bruce_L
Posted : Friday, June 01, 2018 3:40:12 PM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

So you aren't interested in simpe TSV21 making its first upward change of angle while the 21-period linear regression slope of simple TSV21 is down?

You are just interested in the 21-period 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
auchang929
Posted : Friday, June 01, 2018 4:38:09 PM
Gold Customer Gold Customer

Joined: 12/5/2005
Posts: 63


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

Bruce_L
Posted : Friday, June 01, 2018 4:52:17 PM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

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
auchang929
Posted : Friday, June 01, 2018 5:01:59 PM
Gold Customer 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.

Bruce_L
Posted : Tuesday, June 19, 2018 9:15:02 AM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.