Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
Registered User Joined: 9/30/2011 Posts: 788
|
Big congratulations, thank you !
|
|
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
|
|
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
|
|
Registered User Joined: 9/30/2011 Posts: 788
|
Congratulations ! Thak you !
Best regards !
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Registered User Joined: 9/30/2011 Posts: 788
|
Thank you !
Best regards !
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |