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


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Request PCF Formula Linear Regression Slope Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
raider45
Posted : Tuesday, August 14, 2018 10:31:15 AM
Registered User
Joined: 9/30/2011
Posts: 788
I would like to have a PCF Formula with the following parameter:
 
Linear Regression Slope with Up and Down signal on crossing zero line, period 10.
 
Reference: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:slope
 
Thank you and goodbye.
 
Raider45
raider45
Posted : Tuesday, August 14, 2018 10:40:22 AM
Registered User
Joined: 9/30/2011
Posts: 788
I made the wrong setting !
 
I made the wrong setting!
 
I would also like the addition of the editable incline parameter.

 

Bruce_L
Posted : Tuesday, August 14, 2018 10:44:39 AM


Worden Trainer

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

The 10 period linear regression slope can be written as follows.

2 * (FAVGC10 - AVGC10) / 3

Note that it isn't obvious how to change the period in the formula given above, but you can change all instances of 10 in all of the formulas below to adjust the period.

Which is a simplification of the following.

6 * (FAVGC10 - AVGC10) / (10 - 1)

The 10 period linear regression slope being positive can be written as follows.

FAVGC10 > AVGC10

The 10 period linear regression slope being negative can be written as follows.

FAVGC10 < AVGC10

The 10 period linear regression slope changing from negative to positive can be written as follows.

XUP(FAVGC10, AVGC10

The 10 period linear regression slope changing from positive to negative can be written as follows.

XDOWN(FAVGC10, AVGC10)

Linear Regression Line & Moving Linear Regression



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
Posted : Wednesday, August 15, 2018 4:13:29 AM
Registered User
Joined: 9/30/2011
Posts: 788
Thanks for the clarifications, however, I would like to have a PCF Formula with the following parameter:
 
Slope period 8 with a bullish cross on SMA period 4, with a bullish signal on the zero line (crossing Up value).
 
Thank you for your attention.
Bruce_L
Posted : Wednesday, August 15, 2018 10:14:57 AM


Worden Trainer

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

We can use the formula given above to get the 8 period slope.

6 * (FAVGC8 - AVGC8) / (8 - 1)

Which doesn't shorten much.

6 * (FAVGC8 - AVGC8) / 7

Crossing up zero is just the following.

XUP(FAVGC8, AVGC8)

The 4 period SMA of the slope would be the following.

AVG(6 * (FAVGC8 - AVGC8) / 7, 4)

You can factor out the 6 * and / 7 if you are looking for the slope to be crossing up its own 4 period simple moving average.

XUP(FAVGC8 - AVGC8, AVG(FAVGC8 - AVGC8, 4))

So if you need both the cross up through zero and the crossup through the moving average to happen at the same time, you would get the following.

XUP(FAVGC8, AVGC8) AND XUP(FAVGC8 - AVGC8, AVG(FAVGC8 - AVGC8, 4))

If you are just looking for the first bar where the slope is above both zero and its own moving average, you could use the following instead.

TrueInRow(FAVGC8 > AVGC8 AND FAVGC8 - AVGC8 > AVG(FAVGC8 - AVGC8, 4), 2) = 1



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
Posted : Wednesday, August 15, 2018 10:55:48 AM
Registered User
Joined: 9/30/2011
Posts: 788

Big congratulations, thank you !

raider45
Posted : Sunday, September 9, 2018 3:42:54 PM
Registered User
Joined: 9/30/2011
Posts: 788
 
As an explanation, I would like to have a PCF Formua with the following parameter: Price crossing Up on Linear Regression period 8 on the chart.
 
Thank you and goodbye.
 
Raider45
Bruce_L
Posted : Monday, September 10, 2018 11:07:44 AM


Worden Trainer

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

I am going to assume you mean crossing up through the linear regression line (this really isn't the best idea).

C > 3 * FAVGC8 - 2 * AVGC8 AND C1 <= AVGC8 + 15 * (FAVGC8 - AVGC8) / 7

In general, you should be checking for crossing up through the moving linear regression indictaor instead.

XUP(C, 3 * FAVGC8 - 2 * AVGC8)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
Posted : Monday, September 10, 2018 11:34:43 AM
Registered User
Joined: 9/30/2011
Posts: 788
Congratulations !                Thak you !
Best regards !
raider45
Posted : Monday, September 10, 2018 12:04:37 PM
Registered User
Joined: 9/30/2011
Posts: 788
 
I would like to know how to proceed to assemble various formulas with daily and weekly charts with the OR function
Bruce_L
Posted : Monday, September 10, 2018 12:14:10 PM


Worden Trainer

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

I do not know of any way to OR conditions using different time frames into the same condition, condition set, scan, or EasyScan.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
Posted : Tuesday, September 11, 2018 11:06:27 AM
Registered User
Joined: 9/30/2011
Posts: 788
 
I would like to know if it is possible to insert Formula X OR Formula Y with the same period Weekly.
 
Thank you and goodbye Raider45
Bruce_L
Posted : Tuesday, September 11, 2018 11:34:49 AM


Worden Trainer

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

If both X and Y can be expressed as formulas and use the same time frame, then yes, you can use the OR Boolean logical operator to OR X and Y with each other in a single formula.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
Posted : Tuesday, September 11, 2018 12:13:07 PM
Registered User
Joined: 9/30/2011
Posts: 788
 
Thank you !
 
Best regards !
Bruce_L
Posted : Tuesday, September 11, 2018 12:26:18 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.