Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Gold Customer
Joined: 10/7/2004 Posts: 4
|
I would like a PCF that would calculate and sort the linear regression slope 20 day. Can this be done?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
One way to write a Personal Criteria Formula for the 20-Period Linear Regression Slope of the Close would be:
(9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + .5 * C9 - .5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665
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
|
|
Gold Customer
Joined: 2/1/2006 Posts: 98
|
is there a simple way to check if the 20-period linear regression slope of the close in the last 5 days is within 15% of lowest value for the last 63 days (1 quarter)? Can this be done in telechart's PCF?
Many thanks in advance!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Anything I can think of would be too long to be practical. It should probably be noted that taking 15% of the lowest value for the last 63-Trading Days would produce rather odd results anyway as the Linear Regression Slope can be positive, negative or zero.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 12/5/2005 Posts: 63
|
Hi Bruce, please help me to write a PCF to calculate the slope of 13 bar period linear regression on 53 day exponential moving average. Thank you!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
auchang929,
Please try the following:
(6 * XAVGC53 + 5 * XAVGC53.1 + 4 * XAVGC53.2 + 3 * XAVGC53.3 + 2 * XAVGC53.4 + XAVGC53.5 - XAVGC53.7 - 2 * XAVGC53.8 - 3 * XAVGC53.9 - 4 * XAVGC53.10 - 5 * XAVGC53.11 - 6 * XAVGC53.12) / 182
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/16/2005 Posts: 33
|
Could you please help with a Scan/ Sort for finding the linear regression slope of the price % change.
I would like to sort the list based on the slope of the linear regression (15 day) of the daily price % change.
Thanks, Mike
|
|
Gold Customer
Joined: 12/5/2005 Posts: 63
|
Bruce, please help me to write 4 PCF's:
1. The slope of 13 bar period linear regression on price (close price)
2. The slope of 53 bar period linear regression on price (close price)
3. The actual value of 13 bar period linear regression on price (close price)
4.. The slope of 13 bar period linear regression on volume.
Thank you!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (mj) Could you please help with a Scan/ Sort for finding the linear regression slope of the price % change.
I would like to sort the list based on the slope of the linear regression (15 day) of the daily price % change.
Thanks, Mike
100 * (7 * C / C1 + 6 * C1 / C2 + 5 * C2 / C3 + 4 * C3 / C4 + 3 * C4 / C5 + 2 * C5 / C6 + C6 / C7 - C8 / C9 - 2 * C9 / C10 - 3 * C10 / C11 - 4 * C11 / C12 - 5 * C12 / C13 - 6 * C13 / C14 - 7 * C14 / C15) / 280
QUOTE (auchang929) The slope of 13 bar period linear regression on price (close price)
(6 * C + 5 * C1 + 4 * C2 + 3 * C3 + 2 * C4 + C5 - C7 - 2 * C8 - 3 * C9 - 4 * C10 - 5 * C11 - 6 * C12) / 182
QUOTE (auchang929) The slope of 53 bar period linear regression on price (close price)
(26 * C + 25 * C1 + 24 * C2 + 23 * C3 + 22 * C4 + 21 * C5 + 20 * C6 + 19 * C7 + 18 * C8 + 17 * C9 + 16 * C10 + 15 * C11 + 14 * C12 + 13 * C13 + 12 * C14 + 11 * C15 + 10 * C16 + 9 * C17 + 8 * C18 + 7 * C19 + 6 * C20 + 5 * C21 + 4 * C22 + 3 * C23 + 2 * C24 + C25 - C27 - 2 * C28 - 3 * C29 - 4 * C30 - 5 * C31 - 6 * C32 - 7 * C33 - 8 * C34 - 9 * C35 - 10 * C36 - 11 * C37 - 12 * C38 - 13 * C39 - 14 * C40 - 15 * C41 - 16 * C42 - 17 * C43 - 18 * C44 - 19 * C45 - 20 * C46 - 21 * C47 - 22 * C48 - 23 * C49 - 24 * C50 - 25 * C51 - 26 * C52) / 12402
QUOTE (auchang929) The actual value of 13 bar period linear regression on price (close price)
AVGC13 + 6 * (6 * C + 5 * C1 + 4 * C2 + 3 * C3 + 2 * C4 + C5 - C7 - 2 * C8 - 3 * C9 - 4 * C10 - 5 * C11 - 6 * C12) / 182
QUOTE (auchang929) The slope of 13 bar period linear regression on volume.
(6 * V + 5 * V1 + 4 * V2 + 3 * V3 + 2 * V4 + V5 - V7 - 2 * V8 - 3 * V9 - 4 * V10 - 5 * V11 - 6 * V12) / 182
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 12/5/2005 Posts: 63
|
Thank you! Bruce
|
|
Registered User Joined: 1/16/2005 Posts: 33
|
Bruce - Thank you so much (once again). - - Mike
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |