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

Linear Regression Line Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
dhirenshah
Posted : Monday, December 10, 2018 1:30:12 AM
Registered User
Joined: 3/10/2012
Posts: 465

hey Bruce 

How to write pcf for Linear regression centre Line with 1 and 2 standard deviations for 252 periods

thanks 

Bruce_L
Posted : Monday, December 10, 2018 10:45:44 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Right end point of 252 linear regression line

3 * FAVGC252 - 2 * AVGC252

1 standard deviation above right end point of 252 linear regression line

3 * FAVGC252 - 2 * AVGC252 + STDDEV252

1 standard deviation below right end point of 252 linear regression line

3 * FAVGC252 - 2 * AVGC252 - STDDEV252

2 standard deviations above right end point of 252 linear regression line

3 * FAVGC252 - 2 * AVGC252 + 2 * STDDEV252

2 standard deviations below right end point of 252 linear regression line

3 * FAVGC252 - 2 * AVGC252 - 2 * STDDEV252



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Monday, December 10, 2018 12:41:15 PM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce thankyou but what i m trying to get is linear regression lines like in straight lines attached is the image, 

Like when using drawing tool RAFF regression Channel it gives centre and upper and lower straight line from left to right end point that what i m trying to get in linear lines, hope the image helps

https://www.dhirenshah.com/304-2/

Bruce_L
Posted : Monday, December 10, 2018 12:53:12 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I can't think of any way to do that in TC2000 besides using the drawing tools.

About the closest thing which comes to mind would be to create Custom PCF Indicators for price plus and minus some arbitrarily long period of a standard devation:

C + 2 * STDDEV100
C + STDDEV100
C - STDDEV100
C - 2 * STDDEV100

And then add a Linear Regression Line indicator to both it and price. But the lines aren't going to be exactly parallel because you would really want to add and subtract multiples of the current standard deviation with the same period as the linear regression.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Monday, December 10, 2018 1:09:26 PM
Registered User
Joined: 3/10/2012
Posts: 465

Ok got it , thankyou i can play around this idea

cheers

dhirenshah
Posted : Monday, December 10, 2018 2:50:19 PM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce one question 25% of bar near low is ABS( H + 3 * L) / 4 so what is pcf for 10%, 15% and 20% of the bar near low 

And 

75% of the bar near high is ABS(3 * H + L) / 4 so what is pcf for  90%, 85% and 80% of the bar near high

 

thanks 

Bruce_L
Posted : Monday, December 10, 2018 3:02:16 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If you wanted to do things in percentages, you can just use sums which add up to 100.

10% (near bottom)

(10 * H + 90 * L) / 100

Or:

(H + 9 * L) / 10

15%

(15 * H + 85 * L) / 100

Or:

(3 * H + 17 * L) / 20

20%

(20 * H + 80 * L) / 100

Or:

(H + 4 * L) / 5

75%

(75 * H + 25 * L) / 100

Or:

(3 * H + L) / 4

80%

(80 * H + 20 * L) / 100

Or:

(4 * H + L) / 5

85%

(85 * H + 15 * L) / 100

Or:

(17 * H + 3 * L) / 20

90% (near top)

(90 * H + 10 * L) / 100

Or:

(9 * H + L) / 10



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Monday, December 10, 2018 3:10:05 PM
Registered User
Joined: 3/10/2012
Posts: 465

Awesome thankyou 

Bruce_L
Posted : Monday, December 10, 2018 3:12:45 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

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.